Communication apparatus, communication method, and program

ABSTRACT

The present invention relates to a communication apparatus capable of fully exhibiting capabilities that are inherently possessed by the communication apparatus for performing near field communication, a communication method for use therewith, and a program for use therewith an initiator performs near field communication with a target in accordance with NFCIP-1. For example, for each of predetermined n+1 types of capabilities possessed by the initiator or the target, the initiator generates capsules [ 0 ] to [n] containing one or more pieces of information related to a corresponding capability (S 61 ). Next, the initiator generates a command ATR_REQ containing the generated capsules [ 0 ] to [n] (S 62  to S 64 ). Then, the initiator transmits the command ATR_REQ to the target. The present invention can be applied to, for example, an IC card system.

CROSS REFERENCES TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.11/814,974 filed on Aug. 1, 2007, which is a National Stage ofInternational Application No. PCT/JP06/0301309, filed Jan. 27, 2006,which claims priority to Japanese Priority Patent Application JP2005-023434 filed in the Japan Patent Office on Jan. 31, 2005, theentire content of which is hereby incorporated by reference.

BACKGROUND

The present invention relates to a communication apparatus, acommunication method, and a program and relates to, for example, acommunication apparatus capable of fully exhibiting capabilities thatare inherently possessed by the communication apparatus for performingnear field communication, a communication method for use therewith, anda program for use therewith.

As a system for performing near field communication, for example, an IC(Integrated Circuit) card system is widely known. In the IC card system,a reader/writer generates an electromagnetic wave, thereby forming aso-called RF (Radio Frequency) field (magnetic field). Then, when an ICcard approaches the reader/writer, the IC card receives supply of powerby electromagnetic induction and also data is transmitted between thereader/writer and the IC card.

As a communication protocol for performing near field communicationtypified by that of such an IC card system, for example, NFCIP (NearField Communication Interface and Protocol)-1 is known. NFCIP-1 is alsodefined as ISO/IEC 18092.

For NFCIP-1, the following modes are defined: an active mode that is acommunication mode in which each of a plurality of communicationapparatuses for transmitting and receiving data outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data, and a passive mode that is a communication mode in whichdata is transmitted by load-modulating an electromagnetic wave output byone communication apparatus among the other communication apparatuses ofthe plurality of communication apparatuses. A plurality of communicationapparatuses in compliance with NFCIP-1 perform communication in one ofthe communication modes of the active mode and the passive mode (referto, for example, Patent Document 1 and Non-Patent Document 1).

[Patent Document 1] Japanese Unexamined Patent Application PublicationNo. 2004-215225

[Non-Patent Document 1] Standard ECMA-340, “Near Field CommunicationInterface and Protocol (NFCIP-1)”, 2nd Edition, December 2004, ECMA

SUMMARY

However, when a plurality of communication apparatuses performcommunication in compliance with NFCIP-1, there is a problem in that,even if at least one of a plurality of communication apparatusesinherently has capabilities greater than a group of capabilities definedby NFCIP-1, it is difficult for the apparatus to fully exhibitcapabilities that are inherently possessed.

The present invention has been made in view of such circumstances, andaims to enable capabilities that are inherently possessed by acommunication apparatus for performing near field communication to befully exhibited.

A communication apparatus according to the present invention is acommunication apparatus for performing communication with anothercommunication apparatus that is a communication party in accordance witha communication protocol in which one or more commands and one or moreresponses are at least defined, the communication apparatus including:communication means for performing communication in one of communicationmodes of an active mode, which is a communication mode in which each ofa plurality of apparatuses for transmitting and receiving data outputsan electromagnetic wave, modulates the electromagnetic wave, and therebytransmits data; and a passive mode, which is a communication mode inwhich one apparatus among a plurality of apparatuses outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data, and the other apparatuses among the plurality ofapparatuses transmit data by load-modulating the electromagnetic waveoutput by the one apparatus; control means for performing control suchthat a data group containing one or more pieces of information relatedto one predetermined type of capability possessed by the communicationapparatus or the other communication apparatus is generated for eachtype of capability, and the one or more generated data groups, with theone or more generated data groups being stored in predetermined one ofthe one or more commands and the one or more responses defined by thecommunication protocol, are transmitted to the other communicationapparatus.

The communication protocol further defines attributes that should be orcan be possessed by the communication apparatus and the othercommunication apparatus, at least defines an attribute command fornotifying or requesting the communication party of the attributes as oneof the one or more commands, and at least defines an attribute responseto the attribute command as one of the one or more commands, and thecontrol means can perform control such that the data group containingone or more pieces of information related to the corresponding type ofthe capability is generated for each of the n+1 types (n is an integerof 0 or more) of capabilities differing from the types defined as theattributes in the communication protocol, and the generated n+1 datagroups, with the generated n+1 data groups being stored in the attributecommand or the attribute response, are transmitted to the othercommunication apparatus.

The control means can perform control so that the data group containingat least information indicating a level that is or can be possessed bythe communication apparatus is generated for each of the n+1 types ofcapabilities, and the generated n+1 data groups, with the generated n+1data groups being stored in the attribute command, are transmitted tothe other communication apparatus.

The control means can perform control such that the data groupcontaining at least an instruction for notifying the communicationapparatus of the level of the corresponding type of capability that ispossessed or can be possessed by the other communication apparatus isgenerated for each of the n+1 types of capabilities, and the generatedn+1 data groups, with the generated n+1 data groups being stored in theattribute command, are transmitted to the other communication apparatus.

When the other communication apparatus generate, for each of the n+1types of capabilities, a data group containing at least an instructionfor notifying the other communication apparatus of the level that ispossessed or can be possessed by the communication apparatus, and thegenerated n+1 data groups, with the generated n+1 data groups beingstored in the attribute command, are transmitted to the communicationapparatus, the control means can further perform control such that theattribute command is received by the communication apparatus, and canperform control such that, on the basis of the instruction contained ineach of the n+1 data groups stored in the received attribute command, adata group containing at least information indicating the level of thecorresponding type of capability that is or can be possessed by thecommunication apparatus, is generated for each of the n+1 types ofcapabilities, and the generated n+1 data groups, with the generated n+1data groups being stored in the attribute response, are transmitted tothe other communication apparatus.

The control means can perform control so that a data group containing atleast an instruction instructing that the other communication apparatusactivate the corresponding type of capability is generated for each ofthe n+1 types of capabilities, and the generated n+1 data groups, withthe generated n+1 data groups being stored in the attribute command, aretransmitted to the other communication apparatus.

When the other communication apparatus generate, for each of the n+1types of capabilities, a data group containing at least an instructioninstructing that the other communication apparatus activate thecorresponding capability, and the generated n+1 data groups, with thegenerated n+1 data groups being stored in the attribute command, aretransmitted to the communication apparatus, the control means canfurther perform control such that the attribute command is received bythe communication apparatus, can further perform control for activatingeach of the n+1 types of capabilities on the basis of the instructioncontained in each of the n+1 data groups stored in the receivedattribute command, and can further perform control such that a datagroup containing at least information indicating the result of theactivation of the corresponding type of capability is generated for eachof the n+1 types of capabilities, and the generated n+1 data groups,with the generated n+1 data groups being stored in the attributeresponse, are transmitted to the other communication apparatus.

One type among one or more types of capabilities identified byinformation contained in each of the one or more data groups stored inthe command or the response can be a capability for controlling thepower of an electromagnetic wave output by the communication apparatusor the other communication apparatus.

A communication method according to the present invention is acommunication method for use with a communication apparatus forperforming communication with another communication apparatus that is acommunication party in accordance with a communication protocol in whichone or more commands and one or more responses are at least defined, thecommunication method including steps of: performing communication withanother communication apparatus that is a communication party inaccordance with a communication protocol in which communication isperformed in one of communication modes of an active mode, which is acommunication mode in which each of a plurality of apparatuses fortransmitting and receiving data outputs an electromagnetic wave,modulates the electromagnetic wave, and thereby transmits data; and apassive mode, which is a communication mode in which one apparatus amonga plurality of apparatuses outputs an electromagnetic wave, modulatesthe electromagnetic wave, and thereby transmits data, the otherapparatuses among the plurality of apparatuses transmit data byload-modulating the electromagnetic wave output by the one apparatus,and one or more commands and one or more responses are at least defined;performing control such that a data group containing one or more piecesof information related to one predetermined type of capability possessedby the communication apparatus or the other communication apparatus isgenerated for each type of the capabilities and the one or moregenerated data groups, with the one or more generated data groups beingstored in predetermined one of the one or more commands and the one ormore responses defined by the communication protocol, are transmitted tothe other communication apparatus.

A program according to the present invention is a program that isexecuted by a computer for controlling a communication apparatus forperforming communication with another communication apparatus that is acommunication party in accordance with a communication protocol in whichcommunication is performed in one of communication modes of an activemode, which is a communication mode in which each of a plurality ofapparatuses for transmitting and receiving data outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data; and a passive mode, which is a communication mode inwhich one apparatus among a plurality of apparatuses outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data, and the other apparatuses among the plurality ofapparatuses transmit data by load-modulating the electromagnetic waveoutput by the one apparatus, and one or more commands and one or moreresponses are at least defined, the program including: a control step ofperforming control such that a data group containing one or more piecesof information related to predetermined one type of capability possessedby the communication apparatus or the other communication apparatus isgenerated for each type of the capabilities, and the one or moregenerated data groups, with the one or more generated data groups beingstored in predetermined one of the one or more commands and the one ormore responses defined by the communication protocol, are transmitted tothe other communication apparatus.

In the communication apparatus, the communication method, and theprogram according to the present invention, in one of the active mode,which is a communication mode in which each of a plurality ofapparatuses for transmitting and receiving data outputs anelectromagnetic wave and data is transmitted by modulating theelectromagnetic wave, and the passive mode, which is a communicationmode in which data is transmitted by load-modulating an electromagneticwave output by one apparatus among the other apparatuses of theplurality of apparatuses. Furthermore, communication is performed amonga communication apparatus and other apparatuses that are communicationparties thereof in accordance with a communication protocol in which oneor more commands or one or more responses are at least defined. Morespecifically, a data group containing one or more pieces of informationrelated to one predetermined type of capabilities possessed by thecommunication apparatus or the other NFC communication apparatuses isgenerated for each type of the capabilities, and the generated one ormore data groups, the generated one or more data groups being stored inpredetermined one of one or more commands and one or more responses thatare defined by a communication protocol, are transmitted to the otherNFC communication apparatuses.

According to the present invention, it is possible for a communicationapparatus to perform near field communication with the othercommunication apparatus. In particular, it is possible for the apparatusto fully exhibit capabilities that are inherently possessed by thecommunication apparatus for performing near field communication.

Additional features and advantages are described herein, and will beapparent from the following Detailed Description and the figures.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 shows an example of the configuration of an embodiment of acommunication system to which the present invention is applied.

FIG. 2 illustrates a passive mode.

FIG. 3 illustrates an active mode.

FIG. 4 is a block diagram showing an example of the configuration of anNFC communication apparatus 1.

FIG. 5 is a timing chart illustrating an initial RFCA process.

FIG. 6 is a timing chart illustrating an active RFCA process.

FIG. 7 illustrates an SDD process.

FIG. 8 shows a list of commands and responses.

FIG. 9 is a flowchart illustrating typical initialization and SDDperformed by an NFC communication apparatus.

FIG. 10 is a flowchart illustrating an activation protocol in a passivemode.

FIG. 11 is a flowchart illustrating an activation protocol in an activemode.

FIG. 12 illustrates an example of the configuration of a capsule towhich the present invention is applied.

FIG. 13 illustrates the structure of a command ATR_REQ.

FIG. 14 illustrates the structure of a field BSi of a command ATR_REQ.

FIG. 15 illustrates a transmission rate that can be set in the field BSior a field BRi of command ATR_REQ.

FIG. 16 illustrates the structure of a field PPi of the command ATR_REQ.

FIG. 17 illustrates information LRi that can be set in bit 4 of thefield PPi of the command ATR_REQ.

FIG. 18 is another illustration of information LRi that can be set inbit 4 of the field PPi of the command ATR_REQ.

FIG. 19 illustrates the structure of a response ATR_RES.

FIG. 20 is a flowchart illustrating an ATR_REQ transmission process onan initiator side.

FIG. 21 is a flowchart illustrating an ATR_REQ receiving process on atarget side.

FIG. 22 is a flowchart illustrating an ATR_RES receiving process on theinitiator side.

DETAILED DESCRIPTION

Embodiments of the present application will be described below in detailwith reference to the drawings.

Reference Numerals

1 to 3 NFC communication apparatus, 11 antenna, 12 receiver, 13demodulator, 14 decoder, 15 data processor, 16 encoder, 17 selector, 18electromagnetic wave output section, 19 modulator, 20 load modulator, 21controller, 21A CPU, 21B EEPROM, 22 power-supply unit, 51 capsule, 61 to65 field.

Embodiments of the present invention will be described below withreference to the drawings.

FIG. 1 shows an example of the configuration of an embodiment of acommunication system (the system designates a logical assembly of aplurality of devices, and it does not matter whether each device is inthe same housing) to which the present invention is applied.

In FIG. 1, the communication system is constituted by three NFCcommunication apparatuses 1, 2, and 3. Each of the NFC communicationapparatuses 1 to 3 is designed to be capable of performing near fieldcommunication (NFC (Near Field Communication)) by electromagneticinduction using a carrier wave of a single frequency with other NFCcommunication apparatuses.

At this point, examples of a frequency of a carrier wave used by the NFCcommunication apparatuses 1 to 3 include 13.56 MHz of an ISM (IndustrialScientific Medical) band.

The phrase near field communication means communication that becomespossible when the distance between apparatuses that performcommunication becomes within several 10 cm, and also includescommunication performed with (the housings of) apparatuses that performcommunication being brought into contact with each other.

The communication system of FIG. 1 can be adopted as an IC card systemin which one or more of the NFC communication apparatuses 1 to 3 can bemade to be a reader/writer and the other one or more can be made to bean IC card. Also, each of the NFC communication apparatuses 1 to 3 canbe adopted as a communication system of a PDA (Personal DigitalAssistant), a PC (Personal Computer), a mobile phone, a wrist watch, apen, and the like. That is, the NFC communication apparatuses 1 to 3 areapparatuses that perform near field communication and are not limited toan IC card, a reader/writer, and the like of the IC card system.

The NFC communication apparatuses 1 to 3 are capable of performingcommunication in two communication modes. Examples of the twocommunication modes include a passive mode and an active mode. Forexample, communication between the NFC communication apparatuses 1 and 2among the NFC communication apparatuses 1 to 3 will now be considered.In the passive mode, similarly to the above-described IC card system ofthe related art, for example, the NFC communication apparatus 1, whichis one of the NFC communication apparatuses 1 and 2, modulates (acarrier wave corresponding to) an electromagnetic wave generated byitself and thereby transmits data to the NFC communication apparatus 2that is the other NFC communication apparatus, and the NFC communicationapparatus 2 load-modulates (a carrier wave corresponding to) theelectromagnetic wave generated by the NFC communication apparatus 1 andthereby transmits data to the NFC communication apparatus 1.

On the other hand, in the active mode, each of the NFC communicationapparatuses 1 and 2 modulates (a carrier wave corresponding to) anelectromagnetic wave generated by itself and thereby transmits data.

At this point, when near field communication employing electromagneticinduction is to be performed, an apparatus that starts communication byoutputting an electromagnetic wave first, that is, an apparatus that, soto speak, takes the initiative of communication, will be referred to asan initiator. Near field communication is performed in such a mannerthat the initiator transmits a command to a communication party thereof,and the communication party sends back a response to the command. Thecommunication party that sends back a response to the command from theinitiator will be referred to as a target.

For example, it is assumed that the NFC communication apparatus 1 startsto output an electromagnetic wave and starts communicating with the NFCcommunication apparatus 2. As shown in FIGS. 2 and 3, the NFCcommunication apparatus 1 becomes an initiator, and the NFCcommunication apparatus 2 becomes a target.

In the passive mode, as shown in FIG. 2, the NFC communication apparatus1 that is an initiator continues to output an electromagnetic wave. TheNFC communication apparatus 1 modulates the electromagnetic wave outputby itself, and thereby transmits data to the NFC communication apparatus2 that is a target. Also, the NFC communication apparatus 2load-modulates the electromagnetic wave output by the NFC communicationapparatus 1 that is an initiator and thereby transmits data to the NFCcommunication apparatus 1.

On the other hand, as shown in FIG. 3, in the active mode, when the NFCcommunication apparatus 1, which is an initiator of itself, transmitsdata, the NFC communication apparatus 1 starts to output anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data to the NFC communication apparatus 2 that is a target.Then, after the transmission of data is completed, the NFC communicationapparatus 1 stops outputting the electromagnetic wave. Also, when theNFC communication apparatus 2, which is a target, transmits data, theNFC communication apparatus 2 starts to output an electromagnetic wave,and modulates the electromagnetic wave, and thereby transmits data tothe NFC communication apparatus 2, which is a target. Then, after thetransmission of data is completed, the NFC communication apparatus 2stops outputting the electromagnetic wave.

In FIG. 1, the communication system is constituted by three NFCcommunication apparatuses 1 to 3. However, the number of NFCcommunication apparatuses constituting the communication system is notlimited to 3, and may be 2 or 4 or more. Furthermore, the communicationsystem can include, in addition to an NFC communication apparatus, forexample, an IC card, a reader/writer, and the like constituting an ICcard system of the related art.

Next, FIG. 4 shows an example of the configuration of the NFCcommunication apparatus 1 of FIG. 1. The other NFC communicationapparatuses 2 and 3 of FIG. 1 are configured similarly to the NFCcommunication apparatus 1 of FIG. 4, and accordingly, a descriptionthereof is omitted.

An antenna 11 is configured to include a coil of a closed loop, andoutputs an electromagnetic wave as a result of electrical currentflowing through the coil being changed. Furthermore, as a result ofmagnetic fluxes passing through the coil as the antenna 11 beingchanged, electrical current flows through the antenna 11.

A receiver 12 receives electrical current flowing through the antenna11, and perform tuning and detection, and outputs a signal to ademodulator 13. The demodulator 13 demodulates the signal supplied fromthe receiver 12 and supplies the demodulated signal to a decoder 14. Thedecoder 14 decodes, for example, a Manchester code or the like as asignal supplied from the demodulator 13, and supplies data obtained bythe decoding to a data processor 15.

The data processor 15 performs predetermined processing based on thedata supplied from the decoder 14. Also, the data processor 15 suppliesan encoder 16 with data to be transmitted to another apparatus.

The encoder 16 encodes the data supplied from the data processor 15into, for example, a Manchester code, and supplies the code to aselector 17. The selector 17 selects either a modulator 19 or a loadmodulator 20, and outputs the signal supplied from the encoder 16 to theselected unit.

At this point, under the control of a controller 21, the selector 17selects the modulator 19 or the load modulator 20. The controller 21controls the selector 17 to select the load modulator 20 when thecommunication mode is a passive mode, and the NFC communicationapparatus 1 is a target. Also, when the communication mode is an activemode or when the communication mode is a passive mode and the NFCcommunication apparatus 1 is an initiator, the controller 21 controlsthe selector 17 to select the modulator 19. Accordingly, the signaloutput by the encoder 16 is supplied to the load modulator 20 throughthe selector 17 when the communication mode is a passive mode and theNFC communication apparatus 1 is a target, and is supplied to themodulator 19 through the selector 17 in other cases.

An electromagnetic wave output section 18 supplies the antenna 11 withelectric current for allowing the antenna 11 to radiate (electromagneticwaves of) a carrier wave having a predetermined single frequency. Inaccordance with the signal supplied from the selector 17, the modulator19 modulates the carrier wave as the electric current supplied to theantenna 11 by the electromagnetic wave output section 18. This allowsthe antenna 11 to radiate carrier-modulated electromagnetic waves inaccordance with data output to the encoder 16 by the data processor 15.

The load modulator 20 changes, in accordance with the signal suppliedfrom the selector 17, an impedance obtained when the coil as the antenna11 is externally observed. When an RF field (magnetic field) is formedaround the antenna 11 as a result of another apparatus outputtingelectromagnetic waves as a carrier wave, the impedance, obtained whenthe coil as the antenna 11 is observed, changes, whereby the RF fieldaround the antenna 11 also changes. This modulates (load-modulates) thecarrier wave as the electromagnetic waves output by the other apparatusin accordance with the signal supplied from the selector 17, andtransmits, to the other apparatus outputting the electromagnetic waves,the data output to the encoder 16 by the data processor 15.

At this point, for example, amplitude shift keying (ASK) can be employedas a modulation method in the modulator 19 and the load modulator 20.However, the modulation method in the modulator 19 and the loadmodulator 20 is not limited to ASK, and PSK (Phase Shift Keying), QAM(Quadrature Amplitude Modulation), etc., can be employed. The modulationfactor of the amplitude is not limited to numerical values, such as 8%to 30%, 50%, and 100%, and a suitable value may be selected.

The controller 21 controls blocks constituting the NFC communicationapparatus 1. That is, the controller 21 is constituted by, for example,a CPU (Central Processing Unit) 21A, an EEPROM (Electrically andErasable Programmable Read Only Memory) 21B, a RAM (Random AccessMemory) (not shown), and others. The CPU 21A executes a program storedin the EEPROM 21B. As a result, control of blocks constituting the NFCcommunication apparatus 1 and other various kinds of processing areperformed. The EEPROM 21B has stored therein a program to be executed bythe CPU 21A and data that is necessary when the CPU 21A operates.

A series of processes performed by the CPU 21A by executing a programcan be performed in such a way that dedicated hardware is provided inplace of the CPU 21A and the dedicated hardware performs the processes.In addition to being installed into the EEPROM 21B in advance, a programto be executed by the CPU 21A can be temporarily or permanently stored(recorded) in a removable recording medium, such as a flexible disk, aCD-ROM (Compact Disc Read Only Memory), an MO (Magneto Optical) disk, aDVD (Digital Versatile Disc), a magnetic disk, or a semiconductormemory, and can be provided as so-called packaged software. Furthermore,the program can be transmitted to the NFC communication apparatus 1 bynear field communication and can be installed into the EEPROM 21B.

A power-supply unit 22 supplies necessary power to the blocksconstituting the NFC communication apparatus 1. In FIG. 4,representation of lines showing that the controller 21 controls theblocks constituting the NFC communication apparatus 1, andrepresentation of lines showing that the power-supply unit 22 suppliespower to the NFC communication apparatus 1 complicate FIG. 4.Accordingly, the representations are omitted. The power-supply unit 22may have incorporated therein a battery, or may obtain power thatbecomes a power source from the electrical current flowing through theantenna 11 without incorporating a battery. However, in the latter case,the NFC communication apparatus 1 operates as only the target in thepassive mode.

Although, in the above case, the decoder 14 and the encoder 16 canprocess the Manchester code, the decoder 14 and the encoder 16 canselectively process not only the Manchester code, but also one of pluraltypes of codes such as modified Miller code and NRZ (Non Return to Zero)code.

Next, all the NFC communication apparatuses 1 to 3 can become initiatorsthat output an electromagnetic wave first and starts communication.Furthermore, in the active mode, in both cases in which the NFCcommunication apparatuses 1 to 3 are initiators or targets, they outputan electromagnetic wave by themselves.

Therefore, when two or more of the NFC communication apparatuses 1 to 3output electromagnetic waves at the same time in a state in which theNFC communication apparatuses 1 to 3 are in proximity with one another,collisions occur, and communication cannot be performed.

Therefore, each of the NFC communication apparatuses 1 to 3 detectswhether or not (an RF field by) an electromagnetic wave from otherapparatuses exists. Only when the electromagnetic wave does not exist,the NFC communication apparatus starts to output an electromagneticwave, thereby preventing collisions. Here, processing in which whetheror not an electromagnetic wave from other apparatuses exist is detectedand only when it does not exist, the output of an electromagnetic waveis started is called an RFCA (RF Collision Avoidance) process from thepurpose of preventing collisions.

There are two types of RFCA process: an initial RFCA process that isperformed first by the NFC communication apparatuses (in FIG. 1, one ormore of the NFC communication apparatuses 1 to 3) that are going tobecome initiators: and a response RFCA process that is performed eachtime an NFC communication apparatus starts to output an electromagneticwave during communication in the active mode. The initial RFCA processand the response RFCA process are the same in that, before the output ofan electromagnetic wave is started, whether or not an electromagneticwave from other apparatuses exists is detected, and only when it doesnot exist, the output of the electromagnetic wave is started. However,between the initial RFCA process and the response RFCA process, a timeperiod until a timing at which the output of an electromagnetic waveneeds to be started after the presence of the electromagnetic waveoutput by the other apparatuses is no longer detected differs.

The initial RFCA process will be described first with reference to FIG.5.

FIG. 5 shows an electromagnetic wave whose output is started by theinitial RFCA process. In FIG. 5 (the same applies to FIG. 6 describedlater), the horizontal axis indicates time, and the vertical axisindicates the level of an electromagnetic wave output by the NFCcommunication apparatus.

The NFC communication apparatus that is going to be an initiator alwaysdetects an electromagnetic wave from another apparatus. When anelectromagnetic wave from another apparatus is not detected continuouslyfor a time period T_(IDT)+n×T_(RFW), the NFC communication apparatusstarts to output an electromagnetic wave and starts transmission (SendRequest) of data (including a command) after a time period T_(IRFG) haspassed after the output.

At this point, T_(IDT) in the time period T_(IDT)+n×T_(RFW) is called aninitial delay time period. When the frequency of the carrier wave isdenoted as f_(c), a value greater than, for example, 4096/f_(c), is usedtherefor. n is an integer of, for example, of 0 to 3, and is generatedusing a random number. T_(RFW) is called an RF waiting time and, forexample, 512/f_(c) is used. The time T_(IRFG) is called an initial guardtime and, for example, a value greater than 5 ms is used.

By using n, which is a random number, for the time periodT_(IDT)+n×T_(RFW) during which an electromagnetic wave should not bedetected, the possibility that a plurality of NFC communicationapparatuses start to output an electromagnetic wave at the same timingis reduced.

When the NFC communication apparatus starts to output an electromagneticwave by the initial RFCA process, the NFC communication apparatusbecomes an initiator. In that case, when the active mode is set as acommunication mode, the NFC communication apparatus that has become aninitiator stops outputting the electromagnetic wave after thetransmission of the data of the NFC communication apparatus iscompleted. On the other hand, when the passive mode is set as acommunication mode, the NFC communication apparatus that has become aninitiator continues, as it is, the output of the electromagnetic wavestarted by the initial RFCA process until the communication with thetarget completely ends.

Next, FIG. 6 shows an electromagnetic wave whose output is started by aresponse RFCA process.

The NFC communication apparatus that is going to output anelectromagnetic wave in the active mode detects an electromagnetic wavefrom another apparatus. When an electromagnetic wave from the otherapparatus is not detected continuously for a time periodT_(ADT)+n×T_(RFW), the NFC communication apparatus starts to output anelectromagnetic wave, and starts the transmission (Send Responses) ofdata after an elapse of a time T_(ARFG) from the output.

n and T_(RFW) in the time period T_(ADT)+n×T_(RFW) are the same as thosein the case of the initial RFCA process of FIG. 5. T_(ADT) in the timeperiod T_(ADT)+n×T_(RFW) is called an active delay time, and a value of,for example, greater than or equal to 768/f_(c) and smaller than orequal to 2559/f_(c), is used. The time T_(ARFG) is called an activeguard time, and a value of, for example, greater than 1024/f_(c), isused.

As is clear from FIGS. 5 and 6, in order to start to output anelectromagnetic wave by the initial RFCA process, an electromagneticwave should not exist during at least the initial delay time T_(IDT),and in order to start to output an electromagnetic wave by the responseRFCA process, an electromagnetic wave should not exist during at leastthe active delay time T_(ADT).

Whereas the initial delay time T_(IDT) is a value greater than4096/f_(c), the active delay time T_(ADT) is a value greater than orequal to 768/f, and smaller than or equal to 2559/f_(c). Therefore, whenthe NFC communication apparatus is going to become an initiator, a statein which an electromagnetic wave does not exist is needed for a timeperiod longer than that when an electromagnetic wave is output duringcommunication in the active mode. To say reversely, when the NFCcommunication apparatus is going to output an electromagnetic waveduring communication in the active mode, an electromagnetic wave needsto be output without taking much delay from when a state in which noelectromagnetic wave exists is reached when compared with the case inwhich the NFC communication apparatus is going to become an initiator.This is due to the following reasons.

That is, when NFC communication apparatuses perform communication in theactive mode, one of the NFC communication apparatuses outputs anelectromagnetic wave by itself and transmits data, and thereafter stopsthe output of the electromagnetic wave. Then, the other NFCcommunication apparatuses start to output an electromagnetic wave andtransmits data. Therefore, in the communication of the active mode, allthe NFC communication apparatuses may have stopped the output of theelectromagnetic wave. For this reason, when the NFC communicationapparatus is going to become an initiator, in order to confirm thatcommunication in the active mode is not being performed around that NFCcommunication apparatus, it is necessary to confirm, for a sufficienttime period, the fact that the other apparatuses do not output anelectromagnetic wave around the NFC communication apparatus that isgoing to become an initiator.

In comparison, in the active mode, as described above, the initiatoroutputs an electromagnetic wave, and thereby transmits data to thetarget. Then, the target starts to output an electromagnetic wave afterthe initiator stops the output of the electromagnetic wave, and therebytransmits data to the initiator. Thereafter, the initiator starts theoutput of the electromagnetic wave after the target starts the output ofthe electromagnetic wave, and thereby transmits data to the initiator.Hereafter, similarly, data is transmitted and received between theinitiator and the target.

Therefore, when an NFC communication apparatus that is going to becomean initiator exists around the initiator and the target that areperforming communication in the active mode, if the time period fromwhen one of the initiator and the target that are performingcommunication in the active mode stops the output of the electromagneticwave until the other starts to output an electromagnetic wave is long,the electromagnetic wave does not exist during the time period.Therefore, the NFC communication apparatus that is going to become aninitiator starts the output of the electromagnetic wave by the initialRFCA process.

In this case, the communication in the active mode, which has beenperformed previously, is impeded.

For this reason, in the response RFCA process that is performed duringcommunication in the active mode, an electromagnetic wave needs to beoutput without taking much delay after a state in which anelectromagnetic wave does not exist is reached.

Next, as described with reference to FIG. 5, the NFC communicationapparatus that is going to become an initiator starts the output of theelectromagnetic wave by the initial RFCA process and thereafter,transmits data. The NFC communication apparatus that is going to becomean initiator starts the output of the electromagnetic wave, and therebybecomes an initiator, and an NFC communication apparatus that exists inproximity with the initiator becomes a target. In order for theinitiator to transmit and receive data to and from the target, it isnecessary to specify the target to and from which data is transmittedand received. For this reason, after the initiator starts the output ofthe electromagnetic wave by the initial RFCA process, the initiatormakes a request for, for example, an NFCID (NFC Identification)determined using a random number or the like as information forspecifying each target to one or more targets that exist in proximitywith the initiator. Then, the target that exists in proximity with theinitiator transmits an NFCID that specifies the target to the initiatorin response to a request from the initiator.

The initiator identifies a target on the basis of the NFCID transmittedfrom the target in the manner described above, and transmits andreceives data to and from the specified target.

In the active mode, the initiator transmits a command (request) ATR_REQ(to be described later), with an NFCID that specifies the initiatorbeing contained therein, and one target sends back (transmits) aresponse ATR_RES (to be described later) for the command ATR_REQ, withan NFCID that specifies the target being contained therein, with theresult that the initiator and the target mutually recognize their NFCIDand identify each other.

On the other hand, in the passive mode, the initiator performsprocessing called an SDD (Single Device Detection) process, so that atarget that exists around (in proximity with) the initiator isidentified using the NFCID.

At this point, in the SDD process, the initiator makes a request for theNFCID of the target. This request is made by the initiator bytransmitting a frame called a polling request frame. When the targetreceives the polling request frame, the target determines, for example,its own NFCID using a random number and transmits a frame called apolling response frame in which the NFCID is located. The initiatorrecognizes the NFCID of the target by receiving the polling responseframe transmitted from the target.

Since the target in the passive mode transmits data by load modulation,the RFCA process is not performed. Therefore, in the SDD process, whenthe initiator makes a request for the NFCID to targets around theinitiator, it can occur that when a plurality of targets exist aroundthe initiator, NFCIDs are transmitted simultaneously from two or more ofthe targets. In this case, NFCIDs that are transmitted from the two ormore targets collide one another, and it is not possible for theinitiator to recognize the colliding NFCIDs.

Accordingly, the SDD processing is performed by, for example, a methodusing time slots in order to avoid collisions of NFCIDs as much aspossible.

FIG. 7 shows an SDD processing sequence performed by a method using timeslots. In FIG. 7, it is assumed that five targets #1, #2, #3, #4, and #5exist around an initiator.

In the SDD processing, the initiator transmits a polling response frame.After completion of the transmission, time slots at intervals of apredetermined time period T_(s) are provided after an elapse of apredetermined time period T_(d). The time period T_(d) is set to, forexample, 512×64/f_(c), and the time period T_(s) as the time slotinterval is set to, for example, 256×64/f_(c). Also, the time slots aresequentially numbered (integer) from zero from, for example, thetemporally preceding slot, whereby they are identified.

Although FIG. 7 shows four time slots #0, #1, #2, and #3, for example,up to sixteen time slots can be set. The number TSN of time slots, setfor a certain polling response frame, is designated by the initiator,and is transmitted, with the number TSN of time slots being contained inthe polling response frame, to a target.

The target receives the polling response frame transmitted from theinitiator, and recognizes the number TSN of time slots. The target usesrandom numbers to generate an integer R in the range of zero to TSN−1,and transmits a polling response frame in which its NFCID is located, atthe timing of the time slot #R determined by the integer R.

As described above, based on random numbers, the target determines timeslots used as timing for transmitting polling response frames. Thus, thetiming at which the targets transmit polling response frames varies.This can avoid collisions of the polling response frames transmitted bythe targets as much as possible.

Even if each target determines, based on a random number, a time slot astiming for transmitting a polling response frame, time slots in whichpolling response frames are transmitted by a plurality of targets maycoincide with one another. This may cause collisions of the pollingresponse frames. In the embodiment in FIG. 7, a polling response frameof target #4 is transmitted in time slot #0, polling response frames oftargets #1 and #3 are transmitted in time slot #1, a polling responseframe of target #5 is transmitted in time slot #2, and a pollingresponse frame of target #3 is transmitted in time slot #3, so that thecollision between targets #1 and #3 occurs.

In this case, the initiator cannot normally receive the polling responseframes of targets #1 and #3 between which the collision occurs.Accordingly, the initiator transmits a polling request frame again. Thisrequests targets #1 and #3 to transmit polling response frames in whichtheir NFCIDs are located. Subsequently, until the initiator recognizesall the NFCIDs of targets #1 to #5 around it, transmission of pollingrequest frames by the initiator and transmission of polling responseframes by the targets are repeatedly performed.

In a case in which, when the initiator transmits a polling request frameagain, all the targets #1 to #5 can send back polling response frames,there is a possibility that polling response frames may collide witheach other. Accordingly, in a case in which, after each target receivesa polling request frame from the initiator, the target receives apolling request frame again without taking much time, for example, thetarget can ignore the polling request frame. However, in this case, inthe embodiment in FIG. 7, regarding the targets #1 and #3, in whichpolling response collision occurs for the initially transmitted pollingrequest frame, the initiator cannot recognize the NFCIDs of the targets#1 and #3. Thus, data exchange cannot be performed between the targets#1 and #3.

Accordingly, targets #2, #4, and #5, in which their polling responseframes are normally received and their NFCIDs can be recognized, aretemporarily excluded (placed in a deselected state) from parties amongwhich communication is performed, whereby a polling response frame as aresponse to the polling request frame cannot be sent back. In this case,those which send back polling response frames to the polling requestframe retransmitted by the initiator are only targets #1 and #3, whoseNFCIDs cannot be recognized through the transmission of the initialpolling request frame. Therefore, in this case, all the NFCIDs oftargets #1 to #5 can be recognized while reducing a possibility thatpolling response frames may collide with each other.

In addition, here, as described above, when a polling request frame isreceived, the target determines (generates) its NFCID based on randomnumbers. Accordingly, from different targets, polling response frameswith identical NFCIDs located therein may be transmitted to theinitiator. When the initiator receives, in different time slots, thepolling response frames with identical NFCIDs located therein, theinitiator can retransmit a polling request frame, for example, similarlyto a case in which polling response frames collide with each other.

As described above, according to NFC communication apparatuses, evenbetween an IC card and a reader/writer constituting the existing IC cardsystem, data can be exchanged at transmission rates employed by the ICcard and the reader/writer. When a target is, for example, an IC card inthe existing IC card system, SDD processing is performed in, forexample, the following manner.

More specifically, in accordance with the initial RFCA process, aninitiator starts to output an electromagnetic wave, and an IC card as atarget obtains power from the electromagnetic waves and initiatesprocessing. In other words, in this case, the target generates operatingpower from the electromagnetic waves output by the initiator since it isan IC card in the existing IC card system.

After obtaining the power and being operable, the target prepares forreceiving a polling request frame within, for example, a maximum of 2seconds, and waits for the polling request frame to be transmitted fromthe initiator.

On the other hand, the initiator can transmit a polling request frameregardless of whether or not the preparation for receiving the pollingrequest frame is completed in the target.

When the target receives the polling request frame from the initiator,as described above, the target transmits a polling response frame to theinitiator at a timing of a predetermined time slot. When the initiatorsuccessfully receives the polling response frame from the target, asdescribed above, it recognizes the NFCID of the target. Also, when theinitiator fails to normally receive the polling response frame from thetarget, the initiator can retransmit a polling request frame.

In this case, the target generates operating power from electromagneticwaves output by the initiator since it is an IC card in the existing ICcard system. Accordingly, the initiator continues the electromagneticwave output initiated by the initial RFCA processing until communicationwith the target completely ends.

Next, according to NFC communication apparatuses, communication isperformed such that an initiator transmits a command to a target, andthe target transmits (sends back) a response to the command from theinitiator.

Accordingly, FIG. 8 shows commands that the initiator transmits to thetarget, and responses that the target transmits to the initiator.

In FIG. 8, those having the characters REQ after the underbar (_)represent commands, and those having the characters RES after theunderbar (_) represent responses. In the embodiment in FIG. 8, six typesof commands, ATR_REQ, WUP_REQ, PSL_REQ, DEP_REQ, DSL_REQ, and RLS_REQ,are available. Similarly to the commands, also six types of responses,ATR_RES, WUP_RES, PSL_RES, DEP_RES, DSL_RES, and RLS_RES, are available.As described above, an initiator transmits a command (request) to atarget, and the target transmits to the initiator a response to thecommand. Accordingly, the command is transmitted by the initiator, andthe response is transmitted by the target.

The command ATR_REQ is such that the initiator notifies the target ofits attributes (specifications) and is transmitted to the target whenthe initiator requests target's attributes. Here, the attributes of theinitiator or the target include the transmission rate of data that canbe transmitted or received by the initiator or the target. In thecommand ATR_REQ, in addition to initiator's attributes, an NFCIDidentifying the initiator is located, and the target recognizes theinitiator's attributes and NFCID by receiving the command ATR_REQ.

The response ATR_RES is transmitted as a response to the command ATR_REQto the initiator when the target receives the command ATR_REQ. In theresponse ATR_RES, attributes, an NFCID, etc., of the target are located.

Transmission rate information as an attribute located in the commandATR_REQ and the response ATR_RES can include all the transmission ratesof data which can be transmitted and received by the initiator and thetarget. In this case, by exchanging the command ATR_REQ and the responseATR_RES once between the initiator and the target, the initiator canrecognize a transmission rate at which the target can performtransmission and reception, and the target can also recognize atransmission rate at which the initiator can perform transmission andreception.

A command WUP_REQ is transmitted when the initiator selects a targetwith which the initiator will communicate. Specifically, by transmittinga command DSL_REQ, which is described later, from the initiator to thetarget, the target can set to be in a deselected state (a state in whichtransmission (response) of data to the initiator is prohibited). Thecommand WUP_REQ is transmitted in the case of releasing the deselectedstate and setting the target to be in a state capable of transmittingdata to the initiator. In the command WUP_REQ, the NFCID of the targetwhose deselected state is to be released is located. Among targetshaving received the command WUP_REQ, a target which is identified by theNFCID located in the received command WUP_REQ releases its deselectedstate.

When, among the targets having received the command WUP_REQ, the targetwhich is identified by the NFCID located in the received command WUP_REQreleases its deselected state, the response WUP_RES is transmitted as aresponse to the command WUP_REQ.

The command WUP_REQ is transmitted only when the initiator is in theactive mode, and the response WUP_RES is transmitted only when thetarget is in the active mode.

A command PSL_REQ is transmitted when the initiator changescommunication parameters concerning communication with the target. Here,the communication parameters include, for example, the transmission rateof data exchanged between the initiator and the target.

The command PSL_REQ includes the value of a changed communicationparameter located therein, and is transmitted from the initiator to thetarget. The target receives the command PSL_REQ, and changes itscommunication parameter in accordance with the value of thecommunication parameter located in the command. The target furthertransmits a response PSL_RES to the command PSL_REQ.

A command DEP_REQ is transmitted when the initiator performstransmission and reception (data exchange with the target) of data(so-called real data). In this command, data to be transmitted to thetarget is located. The response DEP_RES is transmitted as a response tothe command DEP_REQ. In this command, data to be transmitted to theinitiator is located. Accordingly, the command DEP_REQ allows data to betransmitted from the initiator to the target, and the response DEP_RESto the command DEP_REQ allows data to be transmitted from the target tothe initiator.

The command DSL_REQ is transmitted when the initiator sets the target tobe in the deselected state. The target, which receives the commandDSL_REQ, transmits the response DSL_RES to the command DSL_REQ andenters the deselected state, and subsequently becomes not responsive(comes to send back no response) to commands other than the commandWUP_REQ.

A command RLS_REQ is transmitted when the initiator completely ends thecommunication with the target. The target, which has received thecommand RLS_REQ, transmits the response RLS_RES to the command RLS_REQ,and completely ends the communication with the initiator.

At this point, both the commands DSL_REQ and RLS_REQ are common inexcluding a target from parties communicating with the initiator.However, the target excluded by the command DSL_REQ is set to becommunicatable with the initiator again by the command WUP_REQ. However,the target excluded by the command RLS_REQ does not becomecommunicatable with the initiator unless the initiator re-performsprocessing starting from the initial RFCA process. In that point, thecommands DSL_REQ and RLS_REQ differ from each other.

Next, the communication of the NFC communication apparatus is performedin accordance with NFCIP-1 defined as ISO/IEC 18092.

Accordingly, a communication process in accordance with NFCIP-1 will bedescribed with reference to FIGS. 9 to 11.

FIG. 9 is a flowchart illustrating the outline of a communicationprocess in accordance with NFCIP-1.

At first, in step S1, an NFC communication apparatus serving as aninitiator performs an initial RFCA process and proceeds to step S2. Instep S2, it is determined whether or not the NFC communication apparatusserving as an initiator has detected an RF field by the initial RFCAprocessing of step S1. When it is determined in step S2 that the RFfield has been detected, the process returns to step S1, andsubsequently identical processing is repeated. That is, the NFCcommunication apparatus serving as an initiator does not form an RFfield so as not to impede communication by other NFC communicationapparatuses that have formed the RF field while the RF field is beingdetected.

On the other hand, when it is determined in step S2 that the RF fieldhas not been detected, the NFC communication apparatus selects one ofthe communication modes of the active mode and the passive mode. Theprocess then proceeds to step S3, where the NFC communication apparatusfunctions as an initiator and selects, for example, a transmission rate.

That is, in the NFCIP-1, it is possible to select, for example, atransmission rate used for actual communication from among a pluralityof transmission rate, such as 106 kbps, 212 kbps, and 424 kbps.Accordingly, in step S3, the NFC communication apparatus serving as aninitiator selects a transmission rate.

More specifically, in the case of performing passive mode communication,the NFC communication apparatus proceeds from step S2 to step S3-1between steps S3-1 and S3-2 forming step S3, becomes an initiator,changes the communication mode to the passive mode, and selects atransmission rate. Also, in step S3-1, the NFC communication apparatus,performs predetermined initialization and SDD processing, and proceedsto step S4-1 between steps S4-1 and S4-2 forming step S4.

In step S4-1, the NFC communication apparatus is activated (starts up)in the passive mode, exchanges the command ATR_REQ and the responseATR_RES with the target in the passive mode, and proceeds to step S5.

Alternatively, in the case of performing active mode communication, theNFC communication apparatus proceeds from step S2 to step S3-2 betweensteps S3-1 and S3-2 forming step S3, becomes an initiator, changes thecommunication mode to the active mode, selects the transmission rate,and proceeds to step S4-2 between steps S4-1 and S4-2 forming step S4.

In step S4-2, the NFC communication apparatus is activated in the activemode, exchanges the command ATR_REQ and the response ATR_RES with thetarget, and proceeds to step S5.

In step S5, when a communication parameter (for example, a transmissionrate) required for communication needs to be changed from the currentcommunication parameter, the NFC communication apparatus selects thecommunication parameter, exchanges the command PSL_REQ and the responsePSL_RES in which the communication parameter and the like are locatedwith the target, changes the communication parameter, and proceeds tostep S6.

In step S6, the NFC communication apparatus exchanges the commandDEP_REQ and the response DEP_RES with the target in accordance with thecommunication parameter selected in step S5, performs data exchange(communication) based on a data exchange protocol in accordance with thecommunication parameter selected in step S5, ends the data exchange, andthen proceeds to step S7. In step S7, the NFC communication apparatusexchanges the command DSL_REQ and the response DSL_RES, or the commandRSL_REQ and the response RSL_RES with the target, is deactivated, andends the transaction.

The NFC communication apparatus can be set by default to be, forexample, a target. The NFC communication apparatus, which is set to bethe target, forms no RF field, and is on standby until a command istransmitted from the initiator (until the initiator forms an RF field).

Also, the NFC communication apparatus can become an initiator, forexample, in accordance with a request from an application. For example,an application can determine which one of the active mode and thepassive mode the communication mode is, and can select (determine) thetransmission rate.

The NFC communication apparatus, which becomes the initiator, forms anRF field if no RF field is formed in the exterior, and the target isactivated by the RF field formed by the initiator.

After that, the initiator transmits a command in the selectedcommunication mode and a transmission rate, and the target sends back(transmits) a response at a communication mode and a transmission rateidentical to those of the initiator.

Next, a description will be given, with reference to the flowchart inFIG. 10, of processing of an activation protocol in a passive mode(processing performed by an NFC communication apparatus in order toperform data exchange in the passive mode).

At first, in step S11, the initiator performs an initial RFCA process,and the process then proceeds to step S12, where the communication modeis set to be a passive mode. Then, the process proceeds to step S13,where the initiator performs an initialization process and an SDDprocess, and selects a transmission rate.

At this point, the processing of step S11 corresponds to the processingof steps S1 and S2 of FIG. 9, and the processing of steps S12 and S13corresponds to the processing of step S3 (S3-1) of FIG. 9.

Thereafter, the process proceeds to step S14, where the initiatordetermines whether or not a request for attributes should be made to thetarget. Here, the term attributes is information on the specification ofthe NFC communication apparatus, and examples thereof includeinformation on the transmission rate that can be handled by the NFCcommunication apparatus.

When it is determined in step S14 that a request for attributes shouldnot be made to the target, the process proceeds to step S15, where theinitiator performs communication with the target in accordance with itsunique protocol. Then, the process returns to step S14 and subsequently,similar processing is repeated.

When it is determined in step S14 that a request for attributes shouldbe made to the target, the process proceeds to step S16, where theinitiator transmits a command ATR_REQ, thereby making a request forattributes to the target. Then, the initiator waits for a responseATR_RES to the command ATR_REQ to be transmitted from the target, andthe process proceeds to step S17, where the response ATR_RES isreceived. Then, the process proceeds to step S18.

At this point, the processing of steps S16 and S17 corresponds to theprocessing of step S4 (S4-1) of FIG. 9.

In step S18, on the basis of the response ATR_RES received from thetarget in step S17, the initiator determines whether or not thecommunication parameter, that is, for example, a transmission rate, canbe changed. When it is determined in step S18 that the transmission ratecannot be changed, steps S19 to S21 are skipped, and the processproceeds to step S22.

When it is determined in step S18 that the transmission rate can bechanged, the process proceeds to step S19, where the initiator transmitsthe command PSL_REQ, thereby requesting the target to change thetransmission rate. Then, the initiator waits for a response PSL_RES tothe command PSL_REQ to be transmitted from the target, and the processproceeds from step S19 to step S20, where the response PSL_RES isreceived. Then, the process proceeds to step S21. In step S21, theinitiator changes the communication parameter, that is, for example, thetransmission rate in accordance with the response PSL_RES received instep S20, and the process proceeds to step S22.

At this point, the processing of steps S18 to S21 corresponds to theprocessing of step S5 of FIG. 9.

In step S22, the initiator performs data exchange, that is, exchange ofthe command DEP_REQ and the response DEP_RES, with the target inaccordance with a data exchange protocol.

At this point, the processing of step S22 corresponds to the processingof step S6 of FIG. 9.

After data conversion has been performed in step S22, the initiatorproceeds to step S23 or S25 as necessary.

That is, when the initiator sets the target to be in a deselected state,the process proceeds from step S22 to step S23, and the initiatortransmits a command DSL_REQ. Then, the initiator waits for a responseDSL_RES to the command DSL_REQ to be transmitted from the target andproceeds from step S23 to step S24, where the response DSL_RES isreceived. The process then returns to step S14 and subsequently, similarprocessing is repeated.

On the other hand, when the initiator completely ends the communicationwith the target, the process proceeds from step S22 to step S25, wherethe command RLS_REQ is transmitted. Then, the initiator waits for theresponse RLS_RES to the command RLS_REQ to be transmitted from thetarget, and the process then proceeds from step S25 to step S26, wherethe response RLS_RES is received. Then, the process returns to step S11and subsequently, similar processing is repeated.

At this point, the processing of steps S23 and S24 and the processing ofsteps S25 and S26 correspond to the processing of step S7 of FIG. 9.

Next, a description will be given, with reference to the flowchart inFIG. 11, of an activation protocol in the active mode.

At first, in step S31, the initiator performs an initial RFCA process,and the process then proceeds to step S32, where the initiator sets thecommunication mode to an active mode and selects the transmission rate.

Here, the processing of step S31 corresponds to the processing of stepsS1 and S2 of FIG. 9, and the processing of step S32 corresponds to theprocessing of step S3 (S3-2).

Thereafter, in steps S33 to S39, processes similar to those in steps S16to S22 of FIG. 10 is performed, respectively.

That is, in step S33, the initiator transmits a command ATR_REQ, therebymaking a request for attributes to the target. Then, the initiator waitsfor a response ATR_RES to the command ATR_REQ to be transmitted from thetarget, and the process proceeds to step S34, where the response ATR_RESis received. The process then proceeds to step S35.

In step S35, on the basis of the response ATR_RES received from thetarget in step S34, the initiator determines whether or not thecommunication parameter, that is, for example, the transmission rate,can be changed. When it is determined in step S35 that the transmissionrate cannot be changed, the initiator skips steps S36 to S38 andproceeds to step S39.

When it is determined in step S35 that the transmission rate cannot bechanged, the process proceeds to step S36, where the initiator transmitsthe command PSL_REQ, thereby requesting the target to change thetransmission rate. Then, the initiator waits for the response PSL_RES tothe command PSL_REQ to be transmitted from the target, and the processproceeds from step S36 to S37, where the response PSL_RES is received.The process then proceeds to step S38. In step S38, the initiatorchanges the communication parameter, that is, for example, thetransmission rate, in accordance with the response PSL_RES received instep S37, and the process then proceeds to step S39.

In step S39, the initiator performs data exchange, that is, exchange ofthe command DEP_REQ and the response DEP_RES, with the target inaccordance with a data exchange protocol.

At this point, the processing of steps S33 and S34 corresponds to theprocessing of step S4 (S4-2) of FIG. 9, and the processing of steps S35to S38 corresponds to the processing of step S5 of FIG. 9. Theprocessing of step S39 corresponds to the processing of step S6 of FIG.9.

After the data conversion in step S39, the process proceeds to step S40or S44 as necessary.

That is, when the initiator sets the target with which communication isbeing performed to a deselected state and causes one of the targets thathave already been set in a deselected state to wake up, the processproceeds from step S39 to step S40, where the command DSL_REQ istransmitted to the target to be set in a deselected state. Then, theinitiator waits for the response DSL_RES to the command DSL_REQ to betransmitted from the target, and the process proceeds from step S40 tostep S41, where the response DSL_RES is received. Here, the targethaving transmitted the response DSL_RES enters a deselected state.

Thereafter, the process proceeds from step S41 to step S42, where theinitiator transmits a command WUP_REQ to the target to be waked up.Then, the initiator waits for a response WUP_RES to the command WUP_REQto be transmitted from the target, and the process proceeds from stepS42 to step S43, where the response WUP_RES is received. The processthen returns to step S35. Here, the target having transmitted theresponse WUP_RES wakes up, and the waked-up target becomes an object forwhich the processing of step S35 and subsequent steps should beperformed thereafter by the initiator.

On the other hand, when the initiator completely ends communication withthe target, the process proceeds from step S39 to step S44, where thecommand RLS_REQ is transmitted. Then, the initiator waits for a responseRLS_RES to the command RLS_REQ to be transmitted from the target, andthe process proceeds from step S44 to S45, where the response RLS_RES isreceived. The process then returns to step S31 and subsequently, similarprocessing is repeated.

At this point, the processing of steps S40 to 43 and the processing ofsteps S44 and S45 correspond to the processing of step S7 of FIG. 9.

In the foregoing, the communication process in compliance with NFCIP-1has been described with reference to FIGS. 9 to 11.

If the NFC communication apparatus simply performs a communicationprocess in compliance with NFCIP-1, the above-described problem thatinherently possessed capabilities cannot be fully exhibited occurs.

Accordingly, the inventors of the present invention further invented amethod in which one predetermined NFC communication apparatus generates,for each type of the capabilities, a group of data containing one ormore pieces of information related to one predetermined type ofcapability possessed by the NFC communication apparatus or itscommunication party, and transmits it, with the one or more groups ofdata being stored in a predetermined command or a predeterminedresponse, to the NFC communication apparatus of the communication party.

In the following, a structure (data group) that is configured in such amanner that one or more fields in which information related to apredetermined type of capability is described are located inpredetermined order will be referred to as a capsule. “Predeterminedinformation is described” in one predetermined field among one or morefields constituting a predetermined structure, including a capsule, willbe referred to as “predetermined information is set”. More specifically,in this method of the present invention, regarding each of n+1 types (nis an integer of 0 or more) of capabilities possessed by at least one ofthe NFC communication apparatuses on the transmission side and on thereceiving side (the communication party side when viewed from thetransmission side), the NFC communication apparatus on the transmissionside sets various kinds of information related to the corresponding typeof capability in one predetermined field among one or more fields. Thus,a capsule for the corresponding type of capabilities is generated foreach of the n+1 types, and the n+1 capsules, with the n+1 capsules beingstored in predetermined commands and predetermined responses, aretransmitted to the NFC communication apparatus on the receiving side.

This capsule can also be structured to contain, for example, a field inwhich information indicating a predetermined type of capability is set,a field in which “information instructing the activation of capabilitiesto the communication party side” for the predetermined type ofcapability is set, and a field in which “information notifying the factthat the apparatus has confirmed the activation of capabilities to thecommunication party side” for the predetermined type of capability isset.

More specifically, for example, the NFC communication apparatus can usea capsule 51 of the structure shown in FIG. 12. That is, FIG. 12 showsan example of the structure of a capsule to which the present inventionis applied.

The capsule 51 of FIG. 12 is composed of fields 61 to 65.

In the field 61, as shown in FIG. 12, so-called header information iswritten. Accordingly, the field 61 will be hereinafter referred tosimply as a header 61.

In the field 62, as shown in FIG. 12, information used by the NFCcommunication apparatus on the transmission side to instruct apredetermined process to the NFC communication apparatus on thereceiving side (the communication party side when viewed from thetransmission side) is set. Accordingly, the field 62 will be hereinafterreferred to as an “information instructing processing” field 62. Thatis, as will be described later, in the “information instructingprocessing” field 62, one of the pieces of the “information instructingthe activation of capabilities to the communication party side” may beset. A specific example of the information that is set in the“information instructing processing” field 62 will be described later.

In the field 63, as shown in FIG. 12, information indicating apredetermined type of capability among capabilities possessed by the NFCcommunication apparatus on the transmission side is set. Accordingly,the field 63 will be hereinafter referred to as an “informationindicating capabilities” field 63. A specific example of the informationthat is set in the “information indicating capabilities” field 63 willbe described later.

In the field 64, as shown in FIG. 12, information used by the NFCcommunication apparatus on the transmission side to perform instructionsfor the information set in the “information indicating capabilities”field 63 to the left of the field 64, that is, predeterminedinstructions for a predetermined type of capability, on the NFCcommunication apparatuses on the receiving side (the communication partyside when viewed from the transmission side), is set. Accordingly, thefield 64 will be hereinafter referred to as “instructions forinformation indicating capabilities” field 64. That is, in the“instructions for information indicating capabilities” field 64, one ofthe pieces of the “information instructing the activation ofcapabilities to the communication party side” may be set. A specificexample of the information that is set in the “instructions forinformation indicating capabilities” field 64 will be described later.

In the field 65, as shown in FIG. 12, other supplementary information isset. Accordingly, the field 65 will be hereinafter referred to as a“supplementary information” field 65. For example, it is possible forthe NFC communication apparatus on the transmission side to set“information notifying the fact that the NFC communication apparatus hasconfirmed the activation of capabilities to the communication partyside” as supplementary information in the “supplementary information”field 65. A specific example of the information that is set in the“supplementary information” field 65 will be described later.

As a result of employing such a capsule 51, while faithfully using theNFCIP-1 standard as it is between the NFC communication apparatus andthe NFC communication apparatus on the communication party side (whileperforming the above-described communication process in compliance withNFCIP-1), it is possible to exchange information regarding the presenceof capability greater than a group of capabilities defined by NFCIP-1,that is, the capability of a type differing from the type defined byNFCIP-1, or the capability of a type such that the capability levelpossessed by the NFC communication apparatus or the NFC communicationapparatus on the communication party side is higher than the leveldefined by NFCIP-1 even if the type is a type defined by NFCIP-1, andpossible to instruct and confirm the activation of the capability. Thisis because information on the capability greater than a group ofcapabilities defined by NFCIP-1, that is, the capability of a typediffering from the type defined by NFCIP-1, or the capability of a typesuch that the capability level possessed by the NFC communicationapparatus is higher than the level defined by NFCIP-1 even if the typeis a type defined by NFCIP-1, can be easily contained in the capsule 51.

Even if another NFC communication apparatus that does not employ such acapsule 51 becomes a communication party, it is possible for the NFCcommunication apparatus to perform the above-described communicationprocess in accordance with NFCIP-1 as it is with the NFC communicationapparatus on the communication party side.

The location where such a capsule 51 is stored may be set to any commandor any response in the manner described above. However, in thisembodiment, the location is set as a command ATR_REQ or a responseATR_RES. The reason for this is that, as described above, the commandATR_REQ and the response ATR_RES are used when notifying a communicationparty of attributes (specification) of its own or making a request forthe attributes of the communication party. That is, it stands to reasonthat the capsule 51 used when notifying a communication party ofattributes (specification) of its own or making a request for theattributes of the communication party is stored in the command ATR_REQand the response ATR_RES. Another reason is that, in the NFCIP-1, afield called general byte (hereinafter referred to as a “field Gi”) isdefined in the command ATR_REQ and the response ATR_RES, and the capsule51 can be easily stored in the field Gi.

Referring to FIGS. 13 to 19, the command ATR_REQ and the responseATR_RES will be described below in more detail.

For the sake of convenience, a description will be given below byassuming that the initiator transmits a command ATR_REQ and the targettransmits a response ATR_RES. However, naturally, in practice, there canbe a case reverse to that, that is, the target transmits the commandATR_REQ and the initiator transmits the response ATR_RES.

FIG. 13 shows the structure of the command ATR_REQ defined by NFCIP-1.

As shown in FIG. 13, the command ATR_REQ is composed of, starting fromthe beginning (from the left in the figure), a field CMD0, a field CMD1,and fields Byte 0 to Byte n+14 (n is an integer of 0 or more).

In the field CMD0, (D4) is set. In the field CMD1, a value (00)indicating that this command is a command ATR_REQ is set.

In the fields Bytes 0 to 9, the above-described NFCID that specifies theNFC communication apparatus that transmits this command ATR_REQ, thatis, the initiator, is set.

In the field Byte 10, DIDi, which is a device ID of the initiator thattransmits the command ATR_REQ, is set. Accordingly, the field Byte 10will also be hereinafter referred to as a field DIDi.

In the field Byte 11, a bit rate (transmission rate) at which theinitiator for transmitting the command ATR_REQ transmits data is set.The field Byte 11 will also be hereinafter referred to as a field BSi.The details of the field BSi will be described later with reference toFIGS. 14 and 15.

In the field Byte 12, a bit rate (transmission rate) at which theinitiator for transmitting the command ATR_REQ receives data is set. Thefield Byte 11 will also be hereinafter referred to as a field BRi. Thedetails of the field BRi, together with the details of the field BSi,will be described later.

As described above, each of the transmission rate set in the field BSiand the transmission rate set in the field BRi becomes one of theattributes (specification) of the initiator for transmitting the commandATR_REQ in the manner described above.

In the field Byte 13, an option parameter for the initiator fortransmitting the command ATR_REQ is set. The field Byte 13 will also behereinafter referred to as a field PPi. The details of the field PPiwill be described later with reference to FIGS. 16 to 18.

Each of the fields Byte 14 to Byte 14+n is each of the above-describedfields called general byte, that is, the field Gi. That is, each of then+1 fields Gi is located as each of the fields Byte 14 to 14+n in thecommand ATR_REQ. The n fields Gi will be hereinafter referred to asfields Gi to Gi[n] in the order of the arrangement thereof (in sequencefrom the left in FIG. 13), correspondingly.

Each of the fields Gi[0] to Gi[n] is a field in which various kinds ofinformation specified by a designer or the like is set, and is a fieldprovided as an option. That is, the value n can be changed by a designeror the like, and becomes an integer of 0 or more in the manner describedabove. The value n is set in the field PPi as will be described later.

In this embodiment, as described above, the capsule 51 of FIG. 12 isstored in each of the fields Gi[0] to Gi[n].

The field BSi within the command ATR_REQ will be described below withreference to FIGS. 14 and 15, and then the field BRi will be described.Next, the field PPi will be described below with reference to FIGS. 16to 18.

FIG. 14 shows the structure of the field BSi defined by NFCIP-1.

As shown in FIG. 14, the field BSi is composed of 1-byte information,that is, 8-bit information.

In the following, information of each bit will be referred to as bits 0to 7, correspondingly, from the lowest-order bit (the rightmost bit inFIG. 14) toward the higher-order bits (to the left in FIG. 14). Thisapplies the same for the other fields composed of 1-byte information,that is, for the fields BRi, PPi, Gi, and the like.

In bits 4 to 7 within the field BSi, 0 (ZERO) is set. In each of bits 0to 3, information (0 or 1) indicating whether or not the initiator fortransmitting the command ATR_REQ can perform processing at each of thetransmission rates of 847 kbps, 1695 kbps, 3390 kbps, and 6780 kbps isset. That is, for example, if 0 is assumed to indicate that processingis not possible and 1 is assumed to indicate that processing ispossible, the fact that 0 has been set in bit 0 means that the initiatorfor transmitting the command ATR_REQ cannot perform processing at thetransmission rate of 847 kbps. In comparison, the fact that 1 has beenset in bit 0 means that the initiator for transmitting the commandATR_REQ can perform processing at the transmission rate of 847 kbps.

The fact that, for the NFC communication apparatus, processing at atransmission rate of each of 106 kbps, 212 kbps, and 424 kbps isnecessary and needs to be capable of being performed, is defined byNFCIP-1.

In other words, in NFCIP-1, as shown in FIG. 15, as values that can betaken as transmission rates when data is transmitted and received, 106,212, 424, 847, 1695, 3390, and 6780 kbps are defined. The table of FIG.15 shows transmission rates defined by NFCIP-1.

In the table of FIG. 15, in the leftmost item of “Communication Mode”, acommunication mode in which communication is possible at thetransmission rate described in the item of “kbps” to the right thereofis described. That is, the fact that, at the transmission rates of 106,212, and 424 kbps, communication is possible at any communication modeof the active mode and the passive mode (the NFC communication apparatusneeds only to be configured in such a manner) is defined by NFCIP-1. Incomparison, the fact that, at 847, 1695, 3390, and 6780 kbps,communication needs only possible in the active mode (the NFCcommunication apparatus needs only to be configured in such a manner) isdefined by NFCIP-1.

In the values of FIG. 15, in the center item of “kbps”, transmissionrates defined by NFCIP-1 are described.

In the values of FIG. 15, in the rightmost item of “Divisor D”, valuesof a parameter D used in the following equation (1) when thetransmission rate described in the item of “kbps” to the left thereofare used are described.1 bd=128/(D×f _(c))  (1)

In equation (1), bd indicates the duration time of the bits and f_(c)indicates the frequency of the carrier wave.

In the foregoing, the structure of the field BSi within the commandATR_REQ of FIG. 13 has been described.

The structure of the field BRi is basically identical to the structureof the above-described field BSi, and accordingly, a description thereofis omitted.

In other words, for example, even if the initiator for transmitting thecommand ATR_REQ or the target for receiving the command ATR_REQ canperform processing at a transmission rate higher than 6780 kbps, such ahigh transmission rate is not defined by NFCIP-1, and it cannot be setin the field BRi and the field BSi. Therefore, in such a case, theinitiator may contain information on such a high transmission rate inthe capsule 51 of FIG. 12 and further may store the capsule 51 in thefield Gi[k] of FIG. 13 within the command ATR_REQ (k is one of thevalues of 0 to n). As a result, transmission/reception at such a hightransmission rate is made possible.

Next, a description will be given of the field PPi within the commandATR_REQ with reference to FIGS. 16 to 18.

FIG. 16 shows the structure of the field PPi defined by NFCIP-1.

As shown in FIG. 16, the field PPi is composed of bits 0 to 7.

In bits 7, 6, 3, and 2, 0 (ZERO) is set.

In bits 4 and 5, information LRi for specifying the effective datalength of transport data is set.

As this information LRi, as shown in FIG. 17, one of “00”, “01”, “10”,and “11” is used. That is, FIG. 17 is a table showing each value thatcan be taken by the information LRi, and the range LEN_(MAX) of theeffective data length of the transport data, indicated by each value.

The transport data refers to data of a transport data field shown inFIG. 18, that is, fields CMD0 to Byte N (N is an integer of 0 or moreand is n+14 in the case of examples of FIGS. 13 and 19 (to be describedlater)). That is, FIG. 18 shows the structure of one frame containingtransport data (for example, in this embodiment, predetermined one ofcommands and responses shown in FIG. 8 described above). In more detail,the upper side in FIG. 18 shows the structure of one frame when thetransmission rate is 106 kps, and the lower side shows the structure ofone frame when the transmission rate is 212 kps or 424 kbps.

In FIG. 18, in the field denoted as SB, a value indicating the firstfield of the frame is set. In the field described as LEN, a value suchthat 1 is added to the effective data length of the transport data(transport data field) following the field LEN is set. In the fielddescribed as PA, information indicating a preamble is set. In the fielddescribed as SYNC, information indicating a synchronous pattern(synchronous pattern bit) is set. In the fields described as E1 and E2,a value indicating the end field of the frame is set.

As shown in FIGS. 17 and 18, when the transport data field extends up tothe field Byte 63, that is, when the effective data length of thetransport data is 66 bytes, the information LRi becomes “00”. That is,in this case, “00” is set in bits 4 and 5 of the field PPi of FIG. 16.

When the transport data field extends up to the field Byte 127, that is,when the effective data length of the transport data extends up to 130bytes, the information LRi becomes “01”. That is, in this case, “01” isset in bits 4 and 5 of the field PPi of FIG. 16.

When the transport data field extends up to the field Byte 191, that is,when the effective data length of the transport data extends up to 194bytes, the information LRi becomes “10”. That is, in this case, “10” isset in bits 4 and 5 of the field PPi of FIG. 16.

When the transport data field extends up to the field Byte 255, that is,when the effective data length of the transport data extends up to 258bytes, the information LRi becomes “11”. That is, in this case, “11” isset in bits 4 and 5 of the field PPi of FIG. 16.

In bit 1 of the field PPi of FIG. 16, following the field PPi,information Gi indicating whether or not the above-described fieldsGi[0] to Gi[n] have been located (exist or not) is set. That is, sincethe information Gi is 0 or 1, for example, 0 is assumed to indicate thatthe fields Gi[0] to Gi[n] have not been located (does not exist) and 1is assumed to indicate that the fields Gi[0] to Gi[n] have been located(exist). In this case, the fact that 0 has been set in bit 1 means that,following the field PPi, the fields Gi[0] to Gi[n] have not beenlocated, that is, in this embodiment, no capsule 51 of FIG. 12 has beenstored. In comparison, the fact that 1 has been set in bit 1 means that,following the field PPi, the fields Gi[0] to Gi[n] have been located,that is, at least one capsule 51 has been stored in this embodiment.

In bit 0 of the field PPi, information (0 or 1) indicating whether ornot NAD (Node Address) is used is set. The NAD refers to a sub-addressof the device ID of the initiator for transmitting the command ATR_REQ,which is set in the field Byte 10 of FIG. 13 described above, that is,the field DIDi of FIG. 13. The fact that it is possible to have 16sub-addresses with respect to one device ID is defined by NFCIP-1.

When it is assumed that, for example, 0 in bit 0 indicates that asub-address is not used and 1 indicates that a sub-address is used, thefact that 0 has been set in bit 0 means that the initiator fortransmitting the command ATR_REQ does not use a sub-address. Incomparison, the fact that 1 has been set in bit 0 means that theinitiator for transmitting the command ATR_REQ uses a sub-address.

In the foregoing, the detailed structure of the command ATR_REQ has beendescribed with reference to FIGS. 13 to 18.

The structure of a response to the command ATR_REQ having such astructure, that is, a response ATR_RES, is shown in FIG. 19. When FIG.13 is compared with FIG. 19, it can be seen that the structure of theresponse ATR_RES has the same structure as that of the command ATR_REQ.Accordingly, a description of the structure of the response ATR_RES isomitted.

As has been described in the foregoing, in NFCIP-1, the field Gi isdefined in the command ATR_REQ and the response ATR_RES. Thus, in thisembodiment, the capsule 51 of FIG. 12 described above is stored in thefield Gi of the command ATR_REQ and the response ATR_RES and istransmitted and received among a plurality of NFC communicationapparatuses.

More specifically, for example, in this embodiment, the initiatortransmits the command ATR_REQ to the target in the processing of stepS16 of FIG. 10 described above or in the processing of step S33 of FIG.11 described above. In this case, when the initiator transmits thecommand ATR_REQ, with at least one capsule 51 being contained in thecommand ATR_REQ, to the target, as the processing of step S16 of FIG. 10described above or as the processing of step S33 of FIG. 11 describedabove, for example, an “ATR_REQ transmission process on the initiatorside” shown in FIG. 20 can be performed. That is, FIG. 20 is a flowchartillustrating an example of the “ATR_REQ transmission process on theinitiator side” when the initiator transmits the command ATR_REQcontaining at least one capsule 51.

An example of processing on the target side (hereinafter referred to asan “ATR_REQ receiving process on the target side” for such “ATR_REQtransmission process on the initiator side” of FIG. 20 is shown in FIG.21. That is, FIG. 21 is a flowchart illustrating an example of the“ATR_REQ receiving process on the target side” when the target receivesthe command ATR_REQ having a possibility of containing the capsule 51.

As will be described later, as a result of the “ATR_REQ receivingprocess on the target side” of FIG. 21, the response ATR_RES istransmitted from the target to the initiator. Therefore, in thisembodiment, the initiator receives the response ATR_RES in theprocessing of step S17 of FIG. 10 described above or in the processingof step S34 of FIG. 11 described above. In this case, as the processingof step S17 of FIG. 10 or as the processing of step S34 of FIG. 11, forexample, an “ATR_RES receiving process on the initiator side” shown inFIG. 22 can be performed. That is, FIG. 22 is a flowchart illustratingan example of the “ATR_RES receiving process on the initiator side” whenthe initiator receives a response ATR_RES to the command ATR_REQcontaining at least one capsule 51.

At this point, as described above, since it is assumed for the sake ofconvenience that the initiator transmits a command ATR_REQ, the “ATR_REQtransmission process on the initiator side” of FIG. 20 is performed bythe initiator, the “ATR_REQ receiving process on the target side” ofFIG. 21 is performed by the target, and the “ATR_RES receiving processon the initiator side” of FIG. 22 is performed by the initiator.However, as described above, there is a case in which the targettransmits the command ATR_REQ. In such a case, the “ATR_REQ transmissionprocess on the initiator side” of FIG. 20 is performed by the target,the “ATR_REQ receiving process on the target side” of FIG. 21 isperformed by the initiator, and the “ATR_RES receiving process on theinitiator side” of FIG. 22 is performed by the target.

A description will be individually given below of the “ATR_REQtransmission process on the initiator side” of FIG. 20, the “ATR_REQreceiving process on the target side” of FIG. 21, and the “ATR_RESreceiving process on the initiator side” of FIG. 22 in this order.

In the following description, n+1 capsules 51 are generated or used. Oneof the n+1 capsules 51 that is stored in the field Gi[k] of the requestATR_REQ or the response ATR_RES (k is one of the values of 0 to n) willbe referred to as a capsule [k].

A description will be given first, with reference to the flowchart inFIG. 20, of an example of the “ATR_REQ transmission process on theinitiator side”.

In step S61, the initiator generates each of capsules [0] to [n] for thecommand ATR_REQ. A specific example of the capsules [0] to [n] for thecommand ATR_REQ will be described later.

In step S62, the initiator stores the capsules [0] to [n] in the fieldsGi[0] to Gi[n] of the command ATR_REQ, respectively.

In step S63, the initiator sets the field PPi of the command ATR_REQ.

In step S64, the initiator sets the other fields (the field BSi, thefield BRi, and the like) of the command ATR_REQ.

In step S65, the initiator transmits the command ATR_REQ to the target.

This completes the “ATR_REQ transmission process on the initiator side”.

In the manner described above, when the command ATR_REQ is transmittedfrom the initiator to the target, for example, the target performs theprocess of the “ATR_REQ receiving process on the target side” of FIG.21. Accordingly, a description will be given below, with reference tothe flowchart in FIG. 21, of an example of the “ATR_REQ receivingprocess on the target side”.

n step S81, the target receives the command ATR_REQ.

In step S82, the target interprets the command ATR_REQ.

In step S83, on the basis of the interpretation result of the commandATR_REQ, the target determines whether or not information has beenstored in the fields Gi[0] to Gi[n] of the command ATR_REQ.

When it is determined in step S83 that no information has been stored inthe fields Gi[0] to Gi[n] of the command ATR_REQ, the process proceedsto step S88. That is, the processing of steps S84 to S87 (to bedescribed later) is not performed. The processes of step S88 andsubsequent steps will be described later.

On the other hand, as a result of the “ATR_REQ transmission process onthe initiator side” of FIG. 20, when the command ATR_REQ transmittedfrom the initiator is received in the processing of step S81 and thecommand ATR_REQ is correctly interpreted in the processing of step S82,the capsules [0] to [n] are stored in the fields Gi[0] to Gi[n] of thecommand ATR_REQ, respectively. Therefore, in such a case, when it isdetermined in step S83 that the information has been stored in thefields Gi[0] to Gi[n] of the command ATR_REQ, the process proceeds tostep S84.

In step S84, the target performs a predetermined process in accordancewith each of the fields Gi[0] to Gi[n] of the command ATR_REQ, that is,a predetermined process in accordance with each content of the capsules[0] to [k] stored in the fields Gi[0] to Gi[n], respectively. A specificexample of the predetermined process performed in step S84 will bedescribed later.

In step S85, the target determines whether or not the predeterminedprocess in step S84 has succeeded.

When it is determined in step S85 that the predetermined process in stepS84 has failed (has not succeeded), the process proceeds to step S88.That is, the processing of steps S86 and S87 (to be described later) isnot performed. The processes of step S88 and subsequent steps will bedescribed later.

On the other hand, when it is determined in step S85 that thepredetermined process in step S84 has succeeded, the process proceeds tostep S86. In step S86, the target generates capsules [0] to [n] for theresponse ATR_RES. A specific example of the capsules [0] to [n] for theresponse ATR_RES will be described later.

In step S87, the target stores the capsules [0] to [n] in the fieldsGi[0] to Gi[n] of the response ATR_RES, respectively. Then, the processproceeds to step S88.

As has been described in the foregoing, when the processing of step S87is completed, in the case that the determination in step S83 is NO or inthe case that the determination in step S85 is NO, the process proceedsto step S88. In step S88, the target performs the setting of the fieldPPi of the response ATR_RES.

In step S89, the target performs the setting of the other fields (thefield BSi, the field BRi, and the like) of the response ATR_RES.

In step S90, the target transmits a response ATR_RES to the initiator.

This completes the “ATR_REQ receiving process on the target side”.

When the response ATR_RES is transmitted from the target to theinitiator in the manner described above, the initiator performs, forexample, the process of the “ATR_RES receiving process on the initiatorside” of FIG. 22. Accordingly, a description will be given below, withreference to the flowchart in FIG. 22, of an example of the “ATR_RESreceiving process on the initiator side”.

In step S101, the initiator receives the response ATR_RES.

In step S102, the initiator interprets the response ATR_RES.

In step S103, on the basis of the interpretation result of the responseATR_RES, the initiator determines whether or not information has beenstored in the fields Gi[0] to Gi[n] of the response ATR_RES.

When it is determined in step S103 that no information has been storedin the fields Gi[0] to Gi[n] of the response ATR_RES, the processproceeds to step S106. In step S106, the initiator retransmits thecommand ATR_RES in which the capsules [0] to [n] are stored to thetarget.

Thereafter, the process returns to step S101, and processing of stepS101 and subsequent steps is repeated. That is, the response ATR_REStransmitted from the target in reply to the command ATR_RESretransmitted in the processing of step S106 is obtained in theprocessing of step S101. Then, subsequent processing for the responseATR_RES is repeated.

When the target cannot perform the “ATR_REQ receiving process on thetarget side” of FIG. 21, that is, when the target cannot handle thecapsule 51 of FIG. 12, a loop processing of steps S101 to S106 isrepeated indefinitely. Accordingly, although not shown in the figure,when the initiator counts the number of repetitions of the loopprocessing of steps S101 to S106 and the number of repetitions becomesgreater than or equal to a predetermined threshold value, the target isassumed to be an NFC communication apparatus that cannot handle thecapsule 51, and a predetermined process of internally storing the setcontent of the response ATR_RES is performed. Then, the “ATR_RESreceiving process on the initiator side” may be forcedly completed.

On the other hand, in the “ATR_REQ receiving process on the target side”of FIG. 21, when the above-described processing of steps S86 and S87 isperformed, the response ATR_RES containing the capsules [0] to [k] istransmitted from the target to the initiator in the processing of stepS90, and the response ATR_RES is received in the processing of stepS101, and the response ATR_RES is correctly interpreted in theprocessing of step S102, it is determined in step S103 that informationhas been stored in the fields Gi[0] to Gi[n] of the response ATR_RES,and the process then proceeds to step S104.

In step S104, the initiator performs a predetermined process inaccordance with each of the fields Gi[0] to Gi[n] of the responseATR_RES, that is, a predetermined process in accordance with eachcontent of the capsules [0] to capsule [k] stored in the fields Gi[0] toGi[n], respectively. A specific example of the predetermined processperformed in step S104 will be described later.

In step S105, the initiator determines whether or not the predeterminedprocess in step S104 has succeeded.

When it is determined in step S105 that the predetermined process instep S104 has failed (has not succeeded), the process proceeds to stepS106, and processing of step S106 and subsequent steps is repeated. Thatis, in the processing of step S106, the command ATR_RES in which thecapsules [0] to [n] are stored is retransmitted. In step S101, theresponse ATR_RES therefor is obtained in step S101, and processing ofstep S101 and subsequent steps for the response ATR_RES is repeated.

On the other hand, when it is determined in step S105 that thepredetermined process in step S104 has succeeded, the “ATR_RES receivingprocess on the initiator side” is completed.

In the foregoing, the “ATR_REQ transmission process on the initiatorside” of FIG. 20, the “ATR_REQ receiving process on the target side” ofFIG. 21, and the “ATR_RES receiving process on the initiator side” ofFIG. 22 have been described.

When the “ATR_REQ transmission process on the initiator side” of FIG. 20is performed as the processing of step S16 of FIG. 10 or as theprocessing of step S33 of FIG. 11 and the “ATR_RES receiving process onthe initiator side” of FIG. 22 is performed as the processing of stepS17 of FIG. 10 or as the processing of step S34 of FIG. 11, the commandATR_REQ and the response ATR_RES are exchanged once each.

However, the number of exchanges of the command ATR_REQ and the responseATR_RES is not limited to once and may be a plurality of times.

The following has been described above: for example, by transmitting andreceiving the command ATR_REQ and the response ATR_RES containing thecapsule 51 of FIG. 12 described above between the initiator and thetarget, information regarding the presence of a predetermined type ofcapability is exchanged so that instruction and confirmation of theactivation of the capability is possible. As a method for implementingthe above, the initiator and the target perform the exchange of thecommand ATR_REQ and the response ATR_RES once in order to exchangeinformation regarding the presence of a predetermined type of capabilityand thereafter can perform the exchange of the command ATR_REQ and theresponse ATR_RES one more time in order to instruct and confirm theactivation of the predetermined type of capability.

In this case, although not shown in the figure, the processing of stepsS16 and S17 of FIG. 10 or the processing of steps S33 and S34 of FIG. 11is repeated two times, and thereafter, the processing of step 18 of FIG.10 or the processing of step S35 of FIG. 11 is performed. That is, aseries of processes of the “ATR_REQ transmission process on theinitiator side” of FIG. 20, the “ATR_REQ receiving process on the targetside” of FIG. 21, and the “ATR_RES receiving process on the initiatorside” of FIG. 22 are repeated two times, and thereafter the processingof step 18 of FIG. 10 or the processing of step S35 of FIG. 11 isperformed.

A description will be given below of a specific example of a series ofprocesses of the “ATR_REQ transmission process on the initiator side” ofFIG. 20, the “ATR_REQ receiving process on the target side” of FIG. 21,and the “ATR_RES receiving process on the initiator side” of FIG. 22,which are performed to exchange information regarding the presence of apredetermined type of capability. Then, following the description, adescription will be given of a specific example of a series of processesof the “ATR_REQ transmission process on the initiator side” of FIG. 20,the “ATR_REQ receiving process on the target side” of FIG. 21, and the“ATR_RES receiving process on the initiator side” of FIG. 22, which areperformed so that instruction and confirmation of the activation of thepredetermined type of capability is possible.

That is, a description will be given below by using the capability ofthe control of output electric power of wireless communication betweenthe initiator and the target (hereinafter referred to as “RF powercontrol) as a specific example of one type of capability. In otherwords, a description will be given below of a specific example of aseries of processes performed by the initiator and the target when theinitiator and the target exchange the level of the RF power controlcapability, and issue instructions for performing RF power control(instruct activation) and make a confirmation within the range of thelevel.

In this case, initially, in order to exchange information regarding theRF power control capability, the initiator and the target perform once aseries of processes of the “ATR_REQ transmission process on theinitiator side” of FIG. 20, the “ATR_REQ receiving process on the targetside” of FIG. 21, and the “ATR_RES receiving process on the initiatorside” of FIG. 22.

In more detail, the initiator generates, for example, the followingcapsule [0] in the processing of step S61 of FIG. 20.

That is, the initiator sets information indicating the content of a“report of the RF power control capability” in the “informationinstructing processing” field 62 of FIG. 12.

Next, the initiator sets the following information as informationindicating the capability of the RF power control of the initiator inthe “information indicating capabilities” field 63: “whether or not theoutput power can exceed a predetermined maximum value Hmax”, “whether ornot the output power can fall below a predetermined minimum value Hmin”,“at what levels between the maximum value Hmax and the minimum valueHmin can the output power be adjusted”, “indication of a default value”,“at what levels between the maximum value Hmax and the maximum outputelectric power (RF power) specific to the apparatus can the output powerbe adjusted”, “at what levels between the minimum value Hmin and theminimum output electric power (RF power) specific to the apparatus canthe output power be adjusted”, and others.

Next, the initiator sets a command of “storing the set value of the“information indicating capabilities” field 63″ in the “instructions forinformation indicating capabilities” field 64.

Next, the initiator sets, in the “supplementary information” field 65,“information indicating the content that if each piece of informationstored in the capsule 51 is understood and the storage of the set valueof the “information indicating capabilities” field 63 is completed, makea reply by setting a predetermined password that “interpretation of RFpower capability is completed” in the “supplementary information” field65 within the capsule 51 contained in the response ATR_RES.

Then, the initiator arranges each field that is set in this manner inthe sequence shown in FIG. 12, thereby generating a capsule [0].

Next, in the processing of step S62 of FIG. 20, the initiator stores thecapsule [0] in the field Gi[0] of the command ATR_REQ.

Next, in the processing of step S63, the initiator performs the settingof the field PPi of the command ATR_REQ. More specifically, theinitiator sets 1 in bit 1 of FIG. 16 described above, that is, sets 1 asinformation Gi, so as to indicate that the field Gi (general byte) isvalid. In this case, since only the field Gi[0] is used and as a result,the command ATR_REQ extending up to the field Byte 14 is formed, theinitiator sets “00” in bits 4 and 5 of FIG. 16. That is, “00” is set asinformation LRi. In this case, since n=0, “00” is set as informationLRi. As described above, an appropriate value corresponding to an actualn among “00”, “01”, “11”, and “11” is set. Furthermore, the initiatoralso sets an appropriate value in the other bits of the field PPi.

Then, in the processing of step S64, the initiator performs the settingof the other fields (the field BSi, the field BRi, and the like in FIG.13). In the processing of step S65, the initiator transmits the commandATR_REQ in which each piece of information (each value) has been set inthis manner to the target.

Then, in the processing of step S81 of FIG. 21, the target receives thecommand ATR_REQ and interprets it in the processing of step S82.

When the interpretation of the command ATR_REQ in step S82 hassucceeded, it is determined in the processing of step S83 thatinformation has been stored in the field Gi[0] of the command ATR_REQ,and the process then proceeds to step S84.

In the processing of step S84, the target performs, for example, thefollowing process in accordance with the capsule [0] stored in the fieldGi[0] of the command ATR_REQ.

That is, in this case, in the “information instructing processing” field62 of FIG. 12 within the capsule [0], information indicating content ofa “report of the RF power control capability” is set. Therefore, thetarget recognizes that the capsule [0] is a capsule for making a “reportof the RF power control capability” for the initiator.

Next, the target receives the set content of the “instructions forinformation indicating capabilities” field 64 within the capsule [0],that is, a command of “storing the set value of the “informationindicating capabilities” field 63″, reads the set content of the“information indicating capabilities” field 63 within the capsule [0],and stores it inside itself.

Next, the target recognizes the set content of the “supplementaryinformation” field 65 within the capsule [0], that is, content that “ifeach piece of information stored in the capsule 51 is understood and thestorage of the set value of the “information indicating capabilities”field 63 is completed, make a reply by setting a predetermined passwordthat “interpretation of RF power capability is completed” in the“supplementary information” field 65 within the capsule 51 contained inthe response ATR_RES.

As a result, it is determined in the processing of step S85 that thepredetermined process has succeeded, and the process then proceeds tostep S86.

In the processing of step S86, the target generates, for example, thefollowing capsule [0] for the response ATR_RES.

That is, the target sets information indicating content of a “report ofthe capabilities of its own for RF power control and a reply to thereport from the initiator” in the “information instructing processing”field 62 of FIG. 12.

Next, the target sets the following information as informationindicating capabilities of the RF power control of its own in the“information indicating capabilities” field 63: “whether or not theoutput power can exceed a predetermined maximum value Hmax”, “whether ornot the output power can fall below a predetermined minimum value Hmin”,“at what levels between the maximum value Hmax and the minimum valueHmin can the output power be adjusted”, “indication of a default value”,“at what levels between the maximum value Hmax and the maximum outputelectric power (RF power) specific to the apparatus can the output powerbe adjusted”, “at what levels between the minimum value Hmin and theminimum output electric power (RF power) specific to the apparatus canthe output power be adjusted”, and others.

Next, the target sets a command of “storing the set value of the“information indicating capabilities” field 63″ in the “instructions forinformation indicating capabilities” field 64.

Next, the target sets information indicating a predetermined passwordthat the “interpretation of RF power capability is completed” in the“supplementary information” field 65 in accordance with theabove-described instructions contained in the command ATR_REQ from theinitiator.

Then, the target arranges each field set in this manner in the sequenceshown in FIG. 12, thereby generating a capsule [0].

Next, in the processing of step S87 of FIG. 21, the target stores thecapsule [0] in the field Gi[0] of the response ATR_RES.

Next, in the processing of step S88, the target performs the setting ofthe field PPi of the command ATR_REQ. In more detail, the target sets 1in bit 1 of FIG. 16 described above, that is, sets 1 as information Gi,thereby indicating that the field Gi (general byte) is valid. In thiscase, since only the field Gi[0] is used and as a result, the responseATR_RES extending up to the field Byte 14 is formed, the target sets“00” in bits 4 and 5 of FIG. 16. That is, “00” is set as informationLRi. In this case, since n=0, “00” is set as information LRi. Asdescribed above, an appropriate value corresponding to an actual n among“00”, “01”, “11”, and “11” is set. Furthermore, the target sets anappropriate value in the other bits of the field PPi.

Then, in the processing of step S89, the target performs the setting ofthe other fields (the field BSi, the field BRi, and the like in FIG.13). In the processing of step S90, the target transmits the responseATR_RES in which each piece of information (each value) has been storedin this manner to the initiator.

Then, in the processing of step S101 of FIG. 22, the initiator receivesthe response ATR_RES and interprets it in the processing of step S102.

When the interpretation of the response ATR_RES in step S102 hassucceeded, it is determined in the processing of step S103 thatinformation has been stored in the field Gi[0] of the response ATR_RES,and the process then proceeds to step S104.

In the processing of step S104, the initiator performs, for example, thefollowing process in accordance with the capsule [0] stored in the fieldGi[0] of the response ATR_RES.

That is, in this case, since information indicating the content of a“report of the RF power control capability and a reply to the reportfrom the initiator” is set in the “information instructing processing”field 62 of FIG. 12 within the capsule [0], the initiator recognizesthat the capsule [0] is a capsule for making a report of the RF powercontrol capability for the target and for making a reply to thepreviously transmitted command ATR_REQ.

Next, the initiator receives the set content of the “instructions forinformation indicating capabilities” field 64 within the capsule [0],that is, a command of “storing the set value of the “informationindicating capabilities” field 63″, reads the set content of the“information indicating capabilities” field 63 within the capsule [0],and stores it inside itself.

Then, the initiator recognizes the set content of the “supplementaryinformation” field 65 within the capsule [0], that is, the content ofthe predetermined password that the “interpretation of the RF powercapability is completed”.

As a result, it is determined in the processing of step S105 that thepredetermined process has succeeded, and the “ATR_RES receiving processon the initiator side” is completed.

In the manner described above, it is possible for the initiator and thetarget to exchange the level of the RF power control capability.

Next, in order to make an instruction (instruct activation) ofperforming RF power control within the range of the level and make aconfirmation thereof, the initiator and the target perform once a seriesof processes of the “ATR_REQ transmission process on the initiator side”of FIG. 20, the “ATR_REQ receiving process on the target side” of FIG.21, and the “ATR_RES receiving process on the initiator side” of FIG.22.

In more detail, in the processing of step S61 of FIG. 20, the initiatorgenerates, for example, the following capsule [0].

That is, the initiator sets information indicating the content of“instructing execution” in the “information instructing processing”field 62 of FIG. 12.

Next, the initiator sets information indicating the content of an“object to be instructed so as to be executed is RF power control” inthe “information indicating capabilities” field 63.

Next, the initiator sets a command of “lowering the output electricpower (RF power) by two levels lower than the minimum value Hmin in the“instructions for information indicating capabilities” field 64. Here,it is assumed that the initiator has recognized information such that,as a result of the above-described series of processes for the exchangeof the information regarding the presence of capability, the target hasa capability of performing adjustments at three levels in the range ofthe minimum value Hmin to zero.

Next, the initiator sets, in the “supplementary information” field 65,“information indicating content that if each piece of information storedin the capsule 51 is understood and the execution of processing for thecommand set in the “instructions for information indicatingcapabilities” field 64 is completed, make a reply by setting apredetermined password that “the output voltage has been successfullylowered by two levels” in the “supplementary information” field 65within the capsule 51 contained in the response ATR_RES.

Then, the initiator generates a capsule [0] by arranging each field setin this manner in the sequence shown in FIG. 12.

Next, in the processing of step S62 of FIG. 20, the initiator stores thecapsule [0] in the field Gi[0] of the command ATR_REQ.

Next, in the processing of step S63, the initiator performs the settingof the field PPi of the command ATR_REQ. In more detail, the initiatorsets 1 in bit 1 of FIG. 16 described above, that is, sets 1 asinformation Gi, so as to indicate that the field Gi (general byte) isvalid. Furthermore, in this case, since only the field Gi[0] is used andas a result, the command ATR_REQ extending up to the field Byte 14 isformed, the initiator sets “00” in bits 4 and 5 of FIG. 16. That is,“00” is set as information LRi. In this case, since n=0, “00” is set asinformation LRi. However, as described above, an appropriate valuecorresponding to an actual n among “00”, “01”, “11”, and “11” is set.Furthermore, the initiator sets an appropriate value in the other bitsof the field PPi.

Then, in the processing of step S64, the initiator performs the settingof the other fields (the field BSi, the field BRi, and the like of FIG.13). In the processing of step S65, the initiator transmits the commandATR_REQ in which each information (each value) has been stored in thismanner to the target.

Then, in the processing of step S81 of FIG. 21, the target receives thecommand ATR_REQ and interprets it in the processing of step S82.

When the interpretation of the command ATR_REQ in step S82 hassucceeded, it is determined in the processing of step S83 thatinformation has been stored in the field Gi[0] of the command ATR_REQ,and the process then proceeds to step S84.

In the processing of step S84, the target performs, for example, thefollowing process in accordance with the capsule [0] stored in the fieldGi[0] of the command ATR_REQ.

That is, in this case, since information indicating the content of“instruct execution” is set in the “information instructing processing”field 62 of FIG. 21 within the capsule [0], the target recognizes thatthe capsule [0] is a capsule for instructing the activation of apredetermined type of capability.

Therefore, in order to recognize which type of capability should beinstructed to be activated, the target reads the set content of the“information indicating capabilities” field 63 within the capsule [0].In this case, information indicating the content of an “object to beinstructed so as to be executed is RF power control” is read out.Therefore, the target recognizes that the capsule [0] is a capsule forinstructing the execution of RF power control.

Next, the target receives the set content of the “instructions forinformation indicating capabilities” field 64, that is, a command of“lowering the output electric power (RF power) by two levels lower thanthe minimum value Hmin”, and performs various kinds of processingnecessary to lower the output electric power (RF power) of its own bytwo levels than the minimum value Hmin.

Then, the target recognizes the set content of the “supplementaryinformation” field 65 within the capsule [0], that is, the content that“if each piece of information stored in the capsule 51 is understood andthe execution of processing for the command set in the “instructions forinformation indicating capabilities” field 64 is completed, make a replyby setting a predetermined password that “the output voltage has beensuccessfully lowered by two levels” in the “supplementary information”field 65 within the capsule 51 contained in the response ATR_RES.

As a result, it is determined in the processing of step S85 that thepredetermined process has succeeded, and the process then proceeds tostep S86.

In the processing of step S86, the target generates, for example, thefollowing capsule [0] for the response ATR_RES.

That is, the target sets information indicating the content of a “replyto the command from the initiator” in the “information instructingprocessing” field 62 of FIG. 12.

Next, in accordance with the above-described instructions contained inthe command ATR_REQ from the initiator, the target sets informationindicating a predetermined password that “the output voltage has beensuccessfully lowered by two levels” in the “supplementary information”field 65.

Then, the target generates a capsule [0] by arranging each field set inthis manner in the sequence shown in FIG. 12.

At this point, by assuming that only a reply to the command from theinitiator is to be made, the target sets nothing in the “informationindicating capabilities” field 63 and the “instructions for informationindicating capabilities” field 64. However, when the target is toperform RF power control on the initiator side, it is also possible toset the same content as the set content of the capsule G[0] contained inthe command ATR_REQ from the initiator in the “information indicatingcapabilities” field 63 and the “instructions for information indicatingcapabilities” field 64.

Next, in the processing of step S87 of FIG. 21, the target stores thecapsule [0] in the field Gi[0] of the response ATR_RES.

Next, in the processing of step S88, the target performs the setting ofthe field PPi of the command ATR_REQ. In more detail, the target sets 1in bit 1 of FIG. 16 described above, that is, sets 1 as information Gi,thereby indicating that the field Gi (general byte) is valid. In thiscase, since only the field Gi[0] is used and as a result, the responseATR_RES extending up to field Byte 14 is formed, the target sets “00” inbits 4 and 5 of FIG. 16. That is, “00” is set as information LRi. Inthis case, since n=0, “00” is set as information LRi. However, asdescribed above, an appropriate value corresponding to an actual n among“00”, “01”, “11”, and “11” is set. Furthermore, the target sets anappropriate value in the other bits of the field PPi.

Then, in the processing of step S89, the target performs the setting ofthe other fields (the field BSi, the field BRi, and the like of FIG.13). In the processing of step S90, the target transmits the responseATR_RES in which each information (each value) has been set in thismanner to the initiator.

Then, in the processing of step S101 of FIG. 22, the initiator receivesthe response ATR_RES, and interprets it in the processing of step S102.

When the interpretation of the response ATR_RES in step S102 succeeds,it is determined in the processing of step S103 that information hasbeen stored in the field Gi[0] of the response ATR_RES, and the processthen proceeds to step S104.

In the processing of step S104, the initiator performs, for example, thefollowing process in accordance with the capsule [0] stored in the fieldGi[0] of the response ATR_RES.

That is, in this case, since information indicating the content of a“reply to the command from the initiator” is set in the “informationinstructing processing” field 62 of FIG. 12 within the capsule [0], theinitiator recognizes that the capsule [0] is a capsule for making areply to the previously transmitted command ATR_REQ.

Therefore, the initiator recognizes the set content of the“supplementary information” field 65 within the capsule [0], that is,the content of a predetermined password that “the output voltage hasbeen successfully lowered by two levels”.

As a result, it is determined in the processing of step S105 that thepredetermined process has succeeded, and the “ATR_RES receiving processon the initiator side” is completed.

In the manner described above, after the initiator and the targetexchange the level of the RF power control capability with each other,the initiator and the target can issue instructions (instructactivation) for performing RF power control within the range of thelevel and confirm it.

As a result, for example, when the initiator writes information withhigh importance to the target or reads it from the target, it ispossible to suppress an output voltage when the information istransmitted and received so as to be as low possible. As a result, it ispossible to maintain the confidentiality of the information, that is,the advantage of preventing eavesdropping of the information can beobtained. In particular, when the target is constituted by a card or thelike and the initiator writes important information, such as keyinformation, into the card when the card is issued, this advantagebecomes more conspicuous.

Furthermore, for example, when the initiator performs communication witha predetermined target as a communication party in a state in whichanother target exists, collisions may occur in the manner describedabove. Also, in such a case, the initiator can obtain an advantagecapable of preventing collisions by suppressing the output electricpower of another target and by increasing the output voltage of thetarget of the communication party.

In the above-described example, in both the cases in which the level ofthe RF power control capability is to be exchanged and in whichinstructions (instruct activation) and confirmation for performing RFpower control within the range of the level are to be made, the capsule51 of FIG. 12 is stored in the command ATR_REQ and the response ATR_RES.However, as described above, the storage location is not particularlylimited. For example, when the level of the RF power control capabilityis to be exchanged, the capsule 51 can also be stored in the commandATR_REQ and the response ATR_RES, and when instructions (instructactivation) and confirmation for performing RF power control within therange of the level are to be made, the capsule 51 can also be stored inthe command DEP_REQ and the response DEP_RES.

In this specification, steps which describe a program recorded on arecording medium do not always need to be time-sequentially performed inthe order thereof, but include steps executed in parallel orindividually.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

The application is claimed as follows:
 1. A communication apparatus forperforming communication with another communication apparatus that is acommunication party in accordance with a communication protocol in whichone or more commands and one or more responses are at least defined, thecommunication apparatus comprising: communication means for performingcommunication in one of (i) an active mode, which is a communicationmode in which each of a plurality of apparatuses for transmitting andreceiving data outputs an electromagnetic wave, modulates theelectromagnetic wave, and thereby transmits data, and (ii) a passivemode, which is a communication mode in which one apparatus among aplurality of apparatuses outputs an electromagnetic wave, modulates theelectromagnetic wave, and thereby transmits data, and the otherapparatuses among the plurality of apparatuses transmit data byload-modulating the electromagnetic wave output by the one apparatus;control means for performing control such that a data group containingone or more pieces of information related to one predetermined type ofcapability possessed by the communication apparatus or the othercommunication apparatus is generated for each type of capability, andsubsequently, the one or more generated data groups, with the one ormore generated data groups being stored in a predetermined one of theone or more commands and the one or more responses defined by thecommunication protocol, are transmitted to the other communicationapparatus in a capsule that complies with the communication protocol,the capsule including at least an information indicating capabilitiesfield, which indicates a type of capability possessed by thecommunication apparatus that differs from a capability complying withthe communication protocol, and an instruction for informationindicating capabilities field including instructions configured to beused by the communication party to perform the type of capability thatdiffers from the capability complying with the communication protocolset in the information indicating capabilities field.
 2. Thecommunication apparatus according to claim 1, wherein the communicationprotocol further defines attributes that should be or can be possessedby the communication apparatus and the other communication apparatus, atleast defines an attribute command for notifying or requesting thecommunication party of the attributes as one of the one or morecommands, and at least defines an attribute response to the attributecommand as one of the one or more commands, and the control meansperforms control such that the data group containing one or more piecesof information related to the corresponding type of the capability isgenerated for each of the n+1 types (n is an integer of 0 or more) ofcapabilities differing from the types defined as the attributes in thecommunication protocol, and the generated n+1 data groups, with thegenerated n+1 data groups being stored in the attribute command or theattribute response, are transmitted to the other communicationapparatus.
 3. The communication apparatus according to claim 2, whereinthe control means performs control so that the data group containing atleast information indicating a level that is or can be possessed by thecommunication apparatus is generated for each of the n+1 types ofcapabilities, and the generated n+1 data groups, with the generated n+1data groups being stored in the attribute command, are transmitted tothe other communication apparatus.
 4. The communication apparatusaccording to claim 2, wherein the control means performs control suchthat the data group containing at least an instruction for notifying thecommunication apparatus of the level of the corresponding type ofcapability that is possessed or can be possessed by the othercommunication apparatus is generated for each of the n+1 types ofcapabilities, and the generated n+1 data groups, with the generated n+1data groups being stored in the attribute command, are transmitted tothe other communication apparatus.
 5. The communication apparatusaccording to claim 2, wherein, when the other communication apparatusgenerate, for each of the n+1 types of capabilities, a data groupcontaining at least an instruction for notifying the other communicationapparatus of the level that is possessed or can be possessed by thecommunication apparatus, and the generated n+1 data groups, with thegenerated n+1 data groups being stored in the attribute command, aretransmitted to the communication apparatus, the control means furtherperforms control such that the attribute command is received by thecommunication apparatus, and performs control such that, on the basis ofthe instruction contained in each of the n+1 data groups stored in thereceived attribute command, a data group containing at least informationindicating the level of the corresponding type of capability that is orcan be possessed by the communication apparatus, is generated for eachof the n+1 types of capabilities, and the generated n+1 data groups,with the generated n+1 data groups being stored in the attributeresponse, are transmitted to the other communication apparatus.
 6. Thecommunication apparatus according to claim 2, wherein the control meansperforms control so that a data group containing at least an instructioninstructing that the other communication apparatus activate thecorresponding type of capability is generated for each of the n+1 typesof capabilities, and the generated n+1 data groups, with the generatedn+1 data groups being stored in the attribute command, are transmittedto the other communication apparatus.
 7. The communication apparatusaccording to claim 2, wherein, when the other communication apparatusgenerates, for each of the n+1 types of capabilities, a data groupcontaining at least an instruction instructing that the communicationapparatus activate the corresponding capability, and the generated n+1data groups, with the generated n+1 data groups being stored in theattribute command, are transmitted from the other communicationapparatus to the communication apparatus, the control means furtherperforms control such that the attribute command is received by thecommunication apparatus, further performs control for activating each ofthe n+1 types of capabilities on the basis of the instruction containedin each of the n+1 data groups stored in the received attribute command,and further performs control such that a data group containing at leastinformation indicating the result of the activation of the correspondingtype of capability is generated for each of the n+1 types ofcapabilities, and the generated n+1 data groups, with the generated n+1data groups being stored in the attribute response, are transmitted tothe other communication apparatus.
 8. The communication apparatusaccording to claim 1, wherein one type among one or more types ofcapabilities identified by information contained in each of the one ormore data groups stored in the command or the response is a capabilityfor controlling the power of an electromagnetic wave output by thecommunication apparatus or the other communication apparatus.
 9. Acommunication method for use with a communication apparatus forperforming communication with another communication apparatus that is acommunication party in accordance with a communication protocol in whichone or more commands and one or more responses are at least defined, thecommunication method comprising steps of: performing communication inone of (i) an active mode, which is a communication mode in which eachof a plurality of apparatuses for transmitting and receiving dataoutputs an electromagnetic wave, modulates the electromagnetic wave, andthereby transmits data, and (ii) a passive mode, which is acommunication mode in which one apparatus among a plurality ofapparatuses outputs an electromagnetic wave, modulates theelectromagnetic wave, and thereby transmits data, and the otherapparatuses among the plurality of apparatuses transmit data byload-modulating the electromagnetic wave output by the one apparatus;performing control such that a data group containing one or more piecesof information related to one predetermined type of capability possessedby the communication apparatus or the other communication apparatus isgenerated for each type of the capabilities, and subsequently, the oneor more generated data groups, with the one or more generated datagroups being stored in a predetermined one of the one or more commandsand the one or more responses defined by the communication protocol, aretransmitted to the other communication apparatus in a capsule thatcomplies with the communication protocol, the capsule including at leastan information indicating capabilities field, which indicates a type ofcapability possessed by the communication apparatus that differs from acapability complying with the communication protocol, and an instructionfor information indicating capabilities field including instructionsconfigured to be used by the communication party to perform the type ofcapability that differs from the capability complying with thecommunication protocol set in the information indicating capabilitiesfield.
 10. A non-transitory computer readable medium encoded with aprogram that is executed by a computer for controlling a communicationapparatus for performing communication with another communicationapparatus that is a communication party in accordance with acommunication protocol in which communication is performed in one of (i)an active mode, which is a communication mode in which each of aplurality of apparatuses for transmitting and receiving data outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data, and (ii) a passive mode, which is a communication modein which one apparatus among a plurality of apparatuses outputs anelectromagnetic wave, modulates the electromagnetic wave, and therebytransmits data, and the other apparatuses among the plurality ofapparatuses transmit data by load-modulating the electromagnetic waveoutput by the one apparatus, and one or more commands and one or moreresponses are at least defined, the program comprising: a control stepof performing control such that a data group containing one or morepieces of information related to predetermined one type of capabilitypossessed by the communication apparatus or the other communicationapparatus is generated for each type of the capabilities, andsubsequently, the one or more generated data groups, with the one ormore generated data groups being stored in a predetermined one of theone or more commands and the one or more responses defined by thecommunication protocol, are transmitted to the other communicationapparatus in a capsule that complies with the communication protocol,the capsule including at least an information indicating capabilitiesfield, which indicates a type of capability possessed by thecommunication apparatus that differs from a capability complying withthe communication protocol, and an instruction for informationindicating capabilities field including instructions configured to beused by the communication party to perform the type of capability thatdiffers from the capability complying with the communication protocolset in the information indicating capabilities field.